input: Write a function to optimize a given Python program that prints each element in a list on a new line. The function should modify the program to achieve the same output more efficiently. If the input program is already optimal, return the program as is.
  assert optimize_print_program("numbers = [1, 2, 3, 4, 5, 6]\n\nfor x in numbers:\n    print(x)")=="numbers = [1, 2, 3, 4, 5, 6]\n\nprint(*numbers, sep='\\\\n')"
  assert optimize_print_program("numbers = [1, 2, 3, 4, 5, 6]\n\nprint(*numbers, sep='\\\\n')")=="numbers = [1, 2, 3, 4, 5, 6]\n\nprint(*numbers, sep='\\\\n')"
output: def optimize_print_program(program):
      if "print(*" in program and "sep='\\n')" in program:
          return program
      else:
          lines = program.split('\n')
          for i, line in enumerate(lines):
              if line.strip().startswith("for") and "print(" in line:
                  list_name = line.split()[1].strip(":").split("in")[1].strip()
                  new_line = f"print(*{list_name}, sep='\\n')"
                  lines[i] = new_line
                  break
          return '\n'.join(lines)