Tower of Hanoi with arbitrary number of pegs