Solves a Towers of Hanoi puzzle using recursion.