There are three rods. The first rod holds N disks of pairwise different radii, stacked from the largest at the bottom to the smallest at the top. Monks want to move every disk to the third rod under these two rules.
Only one disk may be moved to another rod at a time.
In every stack, an upper disk must always be smaller than the disk below it.
Write a program that prints the sequence of moves for this task. The number of moves must be the smallest possible.
The picture below is an example with 5 disks.
Input
The first line contains N, the number of disks stacked on the first rod. (1≤N≤20)
Output
Print the number of moves K on the first line.
On each of the next K lines, print the moves in order. Each line holds two integers A and B separated by one space, meaning that the topmost disk of rod A moves onto the top of rod B.
The move sequence with the smallest number of moves is unique, so the correct output is unique as well.