The answer is the colon (large intestine)
The Duodenum is where food is mixed with digestive enzymes and bile. In the ileum, digested food is absorbed into the blood and lymph. Therefore water is reabsorbed in the colon.
A good way of remebering the functions of the digestive system is to annotate pictures of the digestive system in the body - by understanding the structure, it will help understand the function