input: Write a function to solve the Towers of Hanoi game using recursion. The function should take the number of disks `n`, the source peg `source`, the spare peg `spare`, and the target peg `target` as arguments. The function should print out each move of the disk from one peg to another.
  assert solve_hanoi(3, ['A', 'B', 'C'], [], [])==['A', 'B', 'C']
  assert solve_hanoi(2, ['A', 'B'], [], [])==['A', 'B']
  assert solve_hanoi(1, ['A'], [], [])==['A']
  assert solve_hanoi(0, [], [], [])==[]
  assert solve_hanoi(4, ['A', 'B', 'C', 'D'], [], [])==['A', 'B', 'C', 'D']
output: def solve_hanoi(n, source, spare, target):
      if n == 0:
          return source
      solve_hanoi(n-1, source, target, spare)
      print(f"Move disk {n} from {source[0]} to {target[0]}")
      target.insert(0, source.pop(0))
      solve_hanoi(n-1, spare, source, target)
      return target