Tower of Hanoi
Move discs from rod A to rod C using rod B, never placing a bigger disc on a smaller one. Print the minimum number of moves, then each move as from to, using the standard recursive solution.
Input
A single integer .
Output
The number of moves, then one move per line.
Constraints
Sample 1
Input
2
Output
3 A B A C B C