#include <iostream>
using namespace std;
void hanoi(int , char , char , char);
void move(char , char);
int main()
{
    int n;
    cout<<"please input the number of diskes:"<<endl;
    cin>>n;
    cout<<"The step to moving "<<n<<" diskes:"<<endl;
    hanoi(n, 'A', 'B', 'C');
    return 0;
}
void hanoi(int n , char A , char B , char C)
{
    if(n==1)
      move(A,C);
    else
    {
      hanoi(n-1,A,C,B);
      move(A,C);
      hanoi(n-1,B,A,C);
    }
}
void move(char getone , char putone)
{
    cout<<getone<<" to "<<putone<<endl;
}
