def hanoi(n, src, dest, tmp):
    if n == 1:
        print("move from", src, "to", dest)
    else:
        hanoi(n-1, src, tmp, dest)
        print("move from", src, "to", dest)
        hanoi(n-1, tmp, dest, src)
        
hanoi(6,1,3,2)