/* main.c */
/* 此处写main函数及相关内容 */
#include <stdio.h>
void hanoi(int n, char from, char buffer, char to) {
if (n == 1) {
printf("%c-->%c\n", from, to);
return;
}
hanoi(n - 1, from, to, buffer);
printf("%c-->%c\n", from, to);
hanoi(n - 1, buffer, from, to);
}
int main() {
int n;
scanf("%d", &n);
hanoi(n, '1', '2', '3');
return 0;
}