So there's a class of puzzles called "river crossing puzzles" which involve having to cross a river on a boat/bridge containing some set of individuals/items with restrictions on which ones can be on the boat/left on each shore, right?
and the most common subclass of these problems is the one where you have 3 items/animals to cross with.
This is alternatively called the "fox, goose, and bag of beans" or "wolf, goat, and cabbage" puzzle.
the idea is that your boat can only carry one item at a time, but if you leave the wolf/fox unattended with the goat/goose, the wolf/fox will eat the goat/goose.
and similarly, the goose/goat will eat the beans/cabbage if left alone
so you have to set up a set of actions that never leaves either side of the river in one of the lose-states.
the solution to this variant being:
1. take the goat/goose over
2. return empty
3. take the wolf/fox over
4. return with the goat/goose
5. take the cabbage/beans over
6. return empty
7. take the goat/goose over