input: Write a function to solve the Towers of Hanoi game. The function should take the number of disks `n`, the source peg `source`, the spare peg `spare`, and the target peg `target` as inputs, and print the moves to solve the game.
  assert hanoi(3, [(1, "A"), (2, "A"), (3, "A")], [], [])==None
  assert hanoi(4, [(1, "A"), (2, "A"), (3, "A"), (4, "A")], [], [])==None
  assert hanoi(2, [(1, "A"), (2, "A")], [], [])==None
  assert hanoi(1, [(1, "A")], [], [])==None
  assert hanoi(0, [], [], [])==None
output: def hanoi(n, source, spare, target):
      if n == 0:
          return
      hanoi(n-1, source, target, spare)
      disk, src_peg = source.pop()
      target.append((disk, src_peg))
      print(f"Move disk {disk} from {src_peg} to {target[-1][1]}")
      hanoi(n-1, spare, source, target)