#include<stdio.h>
void hanio(int n,char a,char b,char c)
{
if(n==)
printf("%c->%c\n",a,c);
else{
hanio(n-,a,c,b);
printf("%c->%c\n",a,c);
hanio(n-,b,a,c);
}
}
int main(void)
{
int n;
n>=&&n<=;
while(scanf("%d",&n)!=EOF){
hanio(n,'a','b','c');}
return ;
}
05-08 07:56