The ultimate tower of Hanoi algorithm