#include <iostream>
#include <string>
using namespace std;
void process(int n,string from,string to,string help)
{
if(n==1){
cout<<"Move 1 "<<"from"<<from<<" to "<<to<<endl;
}
else{
process(n-1,from,help,to);
cout<<"Move "<<n<<" from "<<from<<" to "<<to<<endl;
process(n-1,help,to,from);
}
}
int main()
{
int n=1000;
string from,to,help;
process(n,"×ó","ÓÒ","ÖÐ");
}