input: 
  def get_stats_for_string(string):
      num_elements = len(string)
      max_element = max(string)
      min_element = min(string)
      mean_element = sum(string) / num_elements
      return (max_element, min_element, mean_element)
  
  # Example usage:
  # string = "abcdef"
  # stats_for_string = get_stats_for_string(string)
  # print("Max: {0}, Min: {1}, Mean: {2}".format(*stats_for_string))
  
output:     sorted_string = sorted(string)
      median_element = sorted_string[num_elements // 2] if num_elements % 2 != 0 else (sorted_string[num_elements // 2 - 1] + sorted_string[num_elements // 2]) / 2
      return (max_element, min_element, mean_element, median_element)