There are three pegs p1, p2 and p3. k disks of different sizes are all placed on peg p1 according to decreasing diameter (the largest one is at the bottom, the smallest one is at the top). Disks can be moved from one peg to another, one disk at a time, subject to the following constraints:

- disk cannot be moved unless it is the top disk on its peg
- disk cannot be placed on a disk of smaller size.

OUTPUT: a sequence of moves accomplishing the task.

DATA SETS: no data sets are needed

NOTES:

- Suggested values for k: 4, 5, 6, possibly 7