input: Write a function to construct a nested loop in Python that prints out each combination of elements from the given arrays on a new line. The function should take three lists as input and use nested loops to iterate through each combination of elements in the first, second, and third list, printing each combination.
  def print_combinations(list1, list2, list3):
      for x in list1:
          for y in list2:
              for z in list3:
                  print(x, y, z)
  
  assert print_combinations([1, 2, 3], [4, 5, 6], [7, 8, 9])
  assert print_combinations([], [4, 5, 6], [7, 8, 9])
  assert print_combinations([1, 2, 3], [], [7, 8, 9])
  assert print_combinations([1, 2, 3], [4, 5, 6], [])
output: def print_combinations(list1, list2, list3):
      for x in list1:
          for y in list2:
              for z in list3:
                  print(x, y, z)