input: from typing import Dict
  import json
  
  def store_and_query_user_data(user_data: Dict[str, str], filename: str) -> Dict[str, str]:
      """
      Store a dictionary of user data into a JSON file and retrieve the data back.
      
      >>> user_data = {"Name": "John", "Age": 25, "City": "New York"}
      >>> store_and_query_user_data(user_data, 'user_data.json')
      {"Name": "John", "Age": 25, "City": "New York"}
      """
      with open(filename, 'w') as f:
          json.dump(user_data, f)
      
      with open(filename, 'r') as f:
          return json.load(f)
output:     with open(filename, 'w') as f:
          json.dump(user_data, f)
      
      with open(filename, 'r') as f:
          return json.load(f)