#include
using namespace std;
void towerOfHanoi(int n,char src,char helper,char destination) {
if(n==0) {
return;
}
///1st- Move (n-1) to helper
towerOfHanoi(n-1,src,helper,destination);
cout << "move " << n << " disk from " << src << " to " << destination << endl;
///3rd-move (n-1) from helper to destination
towerOfHanoi(n-1,helper,destination,src);
///meaning of 3rd - we want to move n-1 from helper to destination using src
}
int main() {
int n;
cin >> n;
towerOfHanoi(n,'A','C','B');
return 0;
}