input: 
  def third_largest(lst):
      """
      Returns the third largest element in a given list, considering only distinct elements.
      If the list has fewer than 3 distinct elements, returns None.
      >>> third_largest([12, 13, 13, 45, 22, 99])
      22
      >>> third_largest([1, 2, 2, 3, 3, 3])
      1
      >>> third_largest([1, 1, 1, 1])
      None
      """
      return third_largest
  
output:     distinct_elements = list(set(lst))
      if len(distinct_elements) < 3:
          return None
      distinct_elements.sort(reverse=True)
      return distinct_elements[2]