Move all disks to the rightmost peg. Only one disk can be moved at a time, and a disk can only be placed on top of a larger disk.