This is the simple little game that just about everyone has seen. It consists of three pegs. At the start of the game, one peg holds n disks in an order of decreasing size. The object of the game is to move all of the disks from the current peg to another peg by moving each disk one at a time and never allowing a larger disk to be on top of a smaller disk.
It's a pretty simple problem if you're able to think about it correctly, otherwise it's complicated. See if you can code something that gives you the steps to solve the puzzle for n disks. It should print out "Move disk k from peg i to peg j." where 1<=k<=n 1<=i,j<=3.