input: Write a function to construct a nested loop in Python that prints out each combination of the given lists on a new line. The function should take a list of lists as input and return a string that indicates the appropriate nested loop structure for printing the combinations.
  assert generate_nested_loop([[1,2,3], [4,5,6], [7,8,9]])=='for x in [1,2,3]:\n  for y in [4,5,6]:\n      for z in [7,8,9]:\n          print(x,y,z)'
  assert generate_nested_loop([[1], [2], [3]])=='for x in [1]:\n  for y in [2]:\n      for z in [3]:\n          print(x,y,z)'
  assert generate_nested_loop([[1,2], [3,4], [5,6]])=='for x in [1,2]:\n  for y in [3,4]:\n      for z in [5,6]:\n          print(x,y,z)'
output: def generate_nested_loop(lists):
      result = ""
      indent = 0
      for i, lst in enumerate(lists):
          result += "  " * indent + f"for x{i} in {lst}:\n"
          indent += 1
      result += "  " * indent + "print(" + ",".join(f"x{i}" for i in range(len(lists))) + ")"
      return result