input: Write a function to parse a JSON data structure. The function should accept a JSON string as input, parse it, and return a tuple containing the values associated with the "name", "age", and "occupation" keys. If any key is missing, it should return None for that key. If the input is not a valid JSON, the function should raise a JSONDecodeError.
  
  import json
  
  def parse_json(data):
      try:
          parsed_data = json.loads(data)
          name = parsed_data.get("name", None)
          age = parsed_data.get("age", None)
          occupation = parsed_data.get("occupation", None)
          return name, age, occupation
      except json.JSONDecodeError:
          raise json.JSONDecodeError("Invalid JSON input", data, 0)
  
  data = '{"name": "John", "age": 18, "occupation": "Software Engineer"}'
  name, age, occupation = parse_json(data)
  print(name, age, occupation)
  # Output: John 18 Software Engineer
  
  data = '{"name": "Jane", "age": 24}'
  name, age, occupation = parse_json(data)
  print(name, age, occupation)
  # Output: Jane 24 None
  
  data = '{"name": "Alice", "occupation": "Student"}'
  name, age, occupation = parse_json(data)
  print(name, age, occupation)
  # Output: Alice None Student
  
  data = 'invalid json'
  try:
      name, age, occupation = parse_json(data)
      print(name, age, occupation)
  except json.JSONDecodeError as e:
      print(e)
  # Output: Expecting value: line 1 column 1 (char 0)
output: def parse_json(data):
      try:
          parsed_data = json.loads(data)
          name = parsed_data.get("name", None)
          age = parsed_data.get("age", None)
          occupation = parsed_data.get("occupation", None)
          return name, age, occupation
      except json.JSONDecodeError:
          raise json.JSONDecodeError("Invalid JSON input", data, 0)