A farmer needs to take a fox, a chicken, and a sack of grain across a river. The only way across the river is by a small boat, which can only hold the farmer and one of the three items. Left unsupervised, the chicken will eat the grain, and the fox will eat the chicken. However, the fox won’t try to eat the grain, and neither the fox nor the chicken will wander off.
How does the farmer get everything across the river?