def hano(n,x,y,z): if n==1: print(x,"-->",z) else: hano(n-1,x,z,y) print(x,"-->",z) hano(n-1,y,x,z) n = int(input("")) hano(n,"A","B","C")