#include<iostream>
using namespace std;
void hano(int n,char form,char temp,char to);
int main()
{
hano(3,'A','C','B');
return 0;
}
void hano(int n,char form,char temp,char to)//若有默认值需要注释起来
{
if(n==1)
cout<<form<<"=>"<<to<<endl;
else{
hano(n-1,form,to,temp);
hano(1,form,temp,to);
hano(n-1,temp,form,to);
}
}