An algorithm to solve the Towers of Hanoi puzzle.