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