PROGRAMMING:The tower of Hanoi problem
Given a tower composed of N disks, these disks are attached to the first pile in a decreasing way. To move the whole tower to another pile, only one disk can be moved at a time, and the larger disk cannot be placed on the smaller disk in the process of moving.
###Input format:
The input consists of four lines:
The first line is the number of disks n (1 < = n < = 10);
The second line to the fourth line are the names of the three piles (string), and N plates are set on the first pile.
###Output format:
Output moving steps, one step per line.
###Input example:
Here is a set of inputs. For example:
```in
two
a
b
c
```
###Output example:
The corresponding output is given here. For example:
```out
a->b
a->c
b->c
```
answer:If there is no answer, please comment
###Input format:
The input consists of four lines:
The first line is the number of disks n (1 < = n < = 10);
The second line to the fourth line are the names of the three piles (string), and N plates are set on the first pile.
###Output format:
Output moving steps, one step per line.
###Input example:
Here is a set of inputs. For example:
```in
two
a
b
c
```
###Output example:
The corresponding output is given here. For example:
```out
a->b
a->c
b->c
```
answer:If there is no answer, please comment