A guy is walking down a road.
With him, he has an apple, a goat, a dog and two wolves.
He comes to a river. He needs to use a boat to get over.
The boat only takes three people(or animals) at once.
If there are more than three in the boat, it will sink.
But: If the goat gets left alone with the apple,
it will eat it.
If the dog gets alone with the goat, he will eat it,
and the wolves will eat both the dog and the goat,
but not each other. When the guy is around everyone is calm,
and nobody gets hurt.....
How can the man get everyone over,
without anything or anyone getting eaten? or drowned....