





"""simple docstring"""
from __future__ import annotations



def      __lowerCamelCase   (							a_     :		list[int]							)			->      list[int]:  # This function is recursive
      __SCREAMING_SNAKE_CASE   :List[str]						=  len(a_							)
      # If the array contains only one element, we return it (it's the stop condition of
      # recursion)
      if array_length <= 1:
            return array
            # Else
      __SCREAMING_SNAKE_CASE   :int						=  array[0]
      __SCREAMING_SNAKE_CASE   :Dict						=  False
      __SCREAMING_SNAKE_CASE   :Optional[int]						=  1
      __SCREAMING_SNAKE_CASE   :list[int]						=  []
      while not is_found and i < array_length:
            if array[i] < pivot:
                  __SCREAMING_SNAKE_CASE   :int						=  True
                  __SCREAMING_SNAKE_CASE   :Any						=  [element for element in array[i:] if element >= array[i]]
                  __SCREAMING_SNAKE_CASE   :Dict						=  longest_subsequence(a_							)
                  if len(a_							) > len(a_							):
                        __SCREAMING_SNAKE_CASE   :int						=  temp_array
            else:
                  i += 1

      __SCREAMING_SNAKE_CASE   :List[str]						=  [element for element in array[1:] if element >= pivot]
      __SCREAMING_SNAKE_CASE   :Dict						=  [pivot, *longest_subsequence(a_							)]
      if len(a_							) > len(a_							):
            return temp_array
      else:
            return longest_subseq


if __name__ == "__main__":
  import doctest

  doctest.testmod()






"""simple docstring"""
from typing import Any



def      __lowerCamelCase   (							a_     :		list							)			->      list[Any]:
      if not input_list:
            return []
      __SCREAMING_SNAKE_CASE   :int						=  [input_list.count(a_							) for value in input_list]
      __SCREAMING_SNAKE_CASE   :str						=  max(a_							)  # Gets the maximum count in the input list.
      # Gets values of modes
      return sorted({input_list[i] for i, value in enumerate(a_							) if value == y}							)


if __name__ == "__main__":
  import doctest

  doctest.testmod()