




'''simple docstring'''




import math





def      a_							(      __snake_case							:			list   ,       __snake_case							:			int = 0   ,       __snake_case							:			int = 0   )							->						list:



       """simple docstring"""
       lowerCamelCase_							=end or len(__snake_case   )
       for i in range(__snake_case   ,       __snake_case   ):
              lowerCamelCase_							=i
              lowerCamelCase_							=array[i]
              while temp_index != start and temp_index_value < array[temp_index - 1]:
                     lowerCamelCase_							=array[temp_index - 1]
                     temp_index -= 1
              lowerCamelCase_							=temp_index_value
       return array





def      a_							(      __snake_case							:			list   ,       __snake_case							:			int   ,       __snake_case							:			int   )							->						None:  # Max Heap



       """simple docstring"""
       lowerCamelCase_							=index
       lowerCamelCase_							=2 * index + 1  # Left Node
       lowerCamelCase_							=2 * index + 2  # Right Node

       if left_index < heap_size and array[largest] < array[left_index]:
              lowerCamelCase_							=left_index

       if right_index < heap_size and array[largest] < array[right_index]:
              lowerCamelCase_							=right_index

       if largest != index:
              lowerCamelCase_,      lowerCamelCase_							=array[largest], array[index]
              heapify(__snake_case   ,       __snake_case   ,       __snake_case   )





def      a_							(      __snake_case							:			list   )							->						list:



       """simple docstring"""
       lowerCamelCase_							=len(__snake_case   )

       for i in range(n // 2   ,       -1   ,       -1   ):
              heapify(__snake_case   ,       __snake_case   ,       __snake_case   )

       for i in range(n - 1   ,       0   ,       -1   ):
              lowerCamelCase_,      lowerCamelCase_							=array[0], array[i]
              heapify(__snake_case   ,       0   ,       __snake_case   )

       return array





def      a_							(      __snake_case							:			list   ,       __snake_case							:			int   ,       __snake_case							:			int   ,       __snake_case							:			int   )							->						int:



       """simple docstring"""
       if (array[first_index] > array[middle_index]) != (
           array[first_index] > array[last_index]
       ):
              return array[first_index]
       elif (array[middle_index] > array[first_index]) != (
           array[middle_index] > array[last_index]
       ):
              return array[middle_index]
       else:
              return array[last_index]





def      a_							(      __snake_case							:			list   ,       __snake_case							:			int   ,       __snake_case							:			int   ,       __snake_case							:			int   )							->						int:



       """simple docstring"""
       lowerCamelCase_							=low
       lowerCamelCase_							=high
       while True:
              while array[i] < pivot:
                     i += 1
              j -= 1
              while pivot < array[j]:
                     j -= 1
              if i >= j:
                     return i
              lowerCamelCase_,      lowerCamelCase_							=array[j], array[i]
              i += 1





def      a_							(      __snake_case							:			list   )							->						list:



       """simple docstring"""
       if len(__snake_case   ) == 0:
              return array
       lowerCamelCase_							=2 * math.ceil(math.loga(len(__snake_case   )   )   )
       lowerCamelCase_							=16
       return intro_sort(__snake_case   ,       0   ,       len(__snake_case   )   ,       __snake_case   ,       __snake_case   )





def      a_							(      __snake_case							:			list   ,       __snake_case							:			int   ,       __snake_case							:			int   ,       __snake_case							:			int   ,       __snake_case							:			int   )							->						list:



       """simple docstring"""
       while end - start > size_threshold:
              if max_depth == 0:
                     return heap_sort(__snake_case   )
              max_depth -= 1
              lowerCamelCase_							=median_of_a(__snake_case   ,       __snake_case   ,       start + ((end - start) // 2) + 1   ,       end - 1   )
              lowerCamelCase_							=partition(__snake_case   ,       __snake_case   ,       __snake_case   ,       __snake_case   )
              intro_sort(__snake_case   ,       __snake_case   ,       __snake_case   ,       __snake_case   ,       __snake_case   )
              lowerCamelCase_							=p
       return insertion_sort(__snake_case   ,       __snake_case   ,       __snake_case   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     a_      :		Optional[Any]							      =       input("""Enter numbers separated by a comma : """).strip()
     a_      :		List[Any]							      =       [float(item) for item in user_input.split(""",""")]
     print(sort(unsorted))






def     __lowerCAmelCase			(			a__						,    a__						,    a__  )       ->  list:
				__a										=    len(a__  )
				__a										=    [[0] * n for i in range(a__  )]
				for i in range(a__  ):
								__a										=    y_points[i]

				for i in range(2						,    a__  ):
								for j in range(a__						,    a__  ):
												__a										=    (
												    (xa - x_points[j - i + 1]) * q[j][i - 1]
												    - (xa - x_points[j]) * q[j - 1][i - 1]
												) / (x_points[j] - x_points[j - i + 1])

				return [q[n - 1][n - 1], q]


if __name__ == "__main__":
					import doctest

					doctest.testmod()