Three missionaries and three cannibals must cross a river in a boat that only accepts one or two people. On no shore can there remain a group in which the cannibals outnumber the missionaries, unless there are no missionaries on that shore.
How can everyone cross safely?