movetower3 a b c moving disk from a to b moving disk from a to c moving disk from b to c moving disk from a to b moving disk from c to a moving disk from c to b moving disk from a to b move_tower 3 a b c moving disk from a to b moving disk from a to c moving disk from b to c moving disk from a to b moving disk from c to a moving disk from c to b moving disk from a to b
def move_tower(height, from_pole, to_pole, with_pole):
    
    if height >= 1:
        move_tower(height - 1, from_pole, with_pole, to_pole)
        move_disk(from_pole, to_pole)
        move_tower(height - 1, with_pole, to_pole, from_pole)


def move_disk(fp, tp):
    print("moving disk from", fp, "to", tp)


def main():
    height = int(input("Height of hanoi: ").strip())
    move_tower(height, "A", "B", "C")


if __name__ == "__main__":
    main()