The Towers of Hanoi (or the Towers of Brahma or the Reve's puzzle)
is an old combinatorial puzzle.
The objective is to move n discs
from peg #1 to peg #3.
However, only one disc may be moved at each turn
and a larger disc must never sit on top of a smaller disc.
The solution is to move n-1 discs to the "spare" peg.
This allows the largest disc to be moved to its destination.
Finally move the n-1 discs from the spare peg to their destination
on top of the biggest disc.
The process of moving the n-1 discs is solved in a like manner.