#include <stdio.h>
void move(int n, char x, char y, char z)
{
if(1 == n)
{
printf("%c--->%c\n",x,z);
}
else
{
move(n-1,x,z,y);
printf("%c--->%c\n",x,z);
move(n-1,y,x,z);
}
}
int main()
{
int n;
printf("Input disks number:\n");
scanf("%d", &n);
printf("The step to moving %d diskes:\n",n);
move(n,'A','B','C');
return 0;
}