Adds solution for general hanoi problem.