#include <stdio.h>
void hanoi (int from, int mid, int to, int n)
{
	if (n == 1) {
		printf("%d -> %d\n", from, to);
	} else {
		hanoi(from, to , mid, n - 1);
		printf("%d -> %d\n", from, to);
		hanoi(mid, from, to, n - 1);
	}
}

main()
{
	hanoi(1, 2, 3, 4);
}

