input: from typing import List, Tuple
  
  
  def hanoi(n: int, source: List[Tuple[int, str]], spare: List[Tuple[int, str]], target: List[Tuple[int, str]]) -> None:
      """
      Solve the Towers of Hanoi game recursively and print each move.
      The game starts with 'n' disks on the 'source' peg, and the goal is to move them all to the 'target' peg, using the 'spare' peg as auxiliary.
      
      >>> hanoi(3, [(i, "A") for i in range(1, 4)], [], [])
      Moving disk 1 from A to C
      Moving disk 2 from A to B
      Moving disk 1 from C to B
      Moving disk 3 from A to C
      Moving disk 1 from B to A
      Moving disk 2 from B to C
      Moving disk 1 from A to C
      """
      if n == 1:
          disk = source.pop(0)
          print("Moving disk {0} from {1} to {2}".format(disk[0], disk[1], target[0][1] if target else "C"))
          target.insert(0, disk)
      else:
          hanoi(n-1, source, target, spare)
          disk = source.pop(0)
          print("Moving disk {0} from {1} to {2}".format(disk[0], disk[1], target[0][1] if target else "C"))
          target.insert(0, disk)
          hanoi(n-1, spare, source, target)
  
  n = 3
  source = [(i, "A") for i in range(1, n+1)]
  target = []
  spare = []
  
  hanoi(n, source, spare, target)
output:     
      if n == 1:
          disk = source.pop(0)
          print("Moving disk {0} from {1} to {2}".format(disk[0], disk[1], target[0][1] if target else "C"))
          target.insert(0, disk)
      else:
          hanoi(n-1, source, target, spare)
          disk = source.pop(0)
          print("Moving disk {0} from {1} to {2}".format(disk[0], disk[1], target[0][1] if target else "C"))
          target.insert(0, disk)
          hanoi(n-1, spare, source, target)
  