Recursive solution to Hanoi problem