

def  _snake_case		(snake_case_					:     Optional[Any]    ,       snake_case_					:     str    ,       snake_case_					:     List[str]  )							->		Optional[Any]:
  __UpperCAmelCase	:  List[Any]		=     index
  __UpperCAmelCase	:  Optional[Any]		=     2 * index + 1
  __UpperCAmelCase	:  Optional[Any]		=     2 * index + 2
  if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
    __UpperCAmelCase	:  Optional[int]		=     left_index

  if right_index < heap_size and unsorted[right_index] > unsorted[largest]:
    __UpperCAmelCase	:  str		=     right_index

  if largest != index:
    __UpperCAmelCase,			__UpperCAmelCase	:  List[Any]		=     unsorted[index], unsorted[largest]
    heapify(snake_case_    ,       snake_case_    ,       snake_case_  )





def  _snake_case		(snake_case_					:     Optional[int]  )							->		Dict:
  __UpperCAmelCase	:  Dict		=     len(snake_case_  )
  for i in range(n // 2 - 1    ,       -1    ,       -1  ):
    heapify(snake_case_    ,       snake_case_    ,       snake_case_  )
  for i in range(n - 1    ,       0    ,       -1  ):
    __UpperCAmelCase,			__UpperCAmelCase	:  Any		=     unsorted[i], unsorted[0]
    heapify(snake_case_    ,       0    ,       snake_case_  )
  return unsorted


if __name__ == "__main__":
      _SCREAMING_SNAKE_CASE							 =			input('''Enter numbers separated by a comma:\n''').strip()
      _SCREAMING_SNAKE_CASE							 =			[int(item) for item in user_input.split(''',''')]
      print(heap_sort(unsorted))








"""simple docstring"""




def   __SCREAMING_SNAKE_CASE		(		lowercase__ = 30 ):
					"""simple docstring"""
					A     =   exponent + 2
					A     =   (1 + 5**0.5) / 2
					A     =   (phi**fibonacci_index - (phi - 1) ** fibonacci_index) / 5**0.5

					return int(lowercase__ )


if __name__ == "__main__":
	print(f"""{solution() = }""")





