A farmer has to transport a fox, goose and a sack of grain across a river. The boat is so small that there is only enough room for the farmer to transport one a time including him, but if he leaver the fox and the goose together, the fox will kill the goose and if the goose and sack of grain is left together the goose will eat the grain. What should the farmer do?