Hanoi Tower Solution without using recursion