input: Write a function to solve the Towers of Hanoi game. The function should take the number of disks 'n' and three lists representing the source, spare, and target pegs. The function should print the steps to move all disks from the source peg to the target peg using the spare peg. If there are no disks, the function should do nothing.
  def hanoi(n, source, spare, target):
      if n == 1:
          disk = source.pop(0)
          print("Moving disk {0} from {1} to {2}".format(disk[0], disk[1], target[1]))
          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[1]))
          target.insert(0, disk)
          hanoi(n-1, spare, source, target)
  
  assert hanoi(3, [(1, "A"), (2, "A"), (3, "A")], [], []) == None # Should print steps to move 3 disks from A to C
  assert hanoi(0, [], [], []) == None # Should do nothing
  assert hanoi(1, [(1, "A")], [], []) == None # Should print "Moving disk 1 from A to C"
output: def hanoi(n, source, spare, target):
      if n == 1:
          disk = source.pop(0)
          print("Moving disk {0} from {1} to {2}".format(disk[0], disk[1], target[1]))
          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[1]))
          target.insert(0, disk)
          hanoi(n-1, spare, source, target)