input: Write a function to solve the Towers of Hanoi game using a recursive approach. The function should take the number of disks `n` and three lists `source`, `spare`, and `target` representing the three pegs. The function should move the disks from the `source` peg to the `target` peg following the rules of the Towers of Hanoi game. If there is only one disk, it should move directly from `source` to `target`. For more than one disk, it should recursively move the top `n-1` disks to the `spare` peg, then move the `n`th disk to the `target` peg, and finally move the `n-1` disks from the `spare` peg to the `target` peg.
  
  assert hanoi(8, [(i, "A") for i in range(1, 9)], [], []) == None
  assert hanoi(1, [(1, "A")], [], []) == None
  assert hanoi(3, [(1, "A"), (2, "A"), (3, "A")], [], []) == None
  assert hanoi(2, [(1, "A"), (2, "A")], [], []) == None
  assert hanoi(0, [], [], []) == None
output: def hanoi(n, source, spare, target):
      if n == 1:
          target.append(source.pop())
      else:
          hanoi(n-1, source, target, spare)
          target.append(source.pop())
          hanoi(n-1, spare, source, target)