





lowercase     :			Dict     						=	1000


def      SCREAMING_SNAKE_CASE      (   lowerCAmelCase       ):
       return x * x


def      SCREAMING_SNAKE_CASE      (   lowerCAmelCase     ,							lowerCAmelCase     ,							lowerCAmelCase     ,							lowerCAmelCase = 4       ):
       assert callable(
           lowerCAmelCase       ), f'''the function(object) passed should be callable your input : {function}'''
       assert isinstance(lowerCAmelCase     ,							(float, int)       ), f'''a should be float or integer your input : {a}'''
       assert isinstance(function(lowerCAmelCase       )     ,							(float, int)       ), (
           "the function should return integer or float return type of your function, "
           f'''{type(lowerCAmelCase       )}'''
       )
       assert isinstance(lowerCAmelCase     ,							(float, int)       ), f'''b should be float or integer your input : {b}'''
       assert (
           isinstance(lowerCAmelCase     ,							lowerCAmelCase       ) and precision > 0
       ), f'''precision should be positive integer your input : {precision}'''

       # just applying the formula of simpson for approximate integration written in
       # mentioned article in first comment of this file and above this function

       _UpperCamelCase														=    (b - a) / N_STEPS
       _UpperCamelCase														=    function(lowerCAmelCase       ) + function(lowerCAmelCase       )

       for i in range(1     ,							lowerCAmelCase       ):
              _UpperCamelCase														=    a + h * i
              result += function(lowerCAmelCase       ) * (4 if i % 2 else 2)

       result *= h / 3
       return round(lowerCAmelCase     ,							lowerCAmelCase       )


if __name__ == "__main__":
       import doctest

       doctest.testmod()













def      SCREAMING_SNAKE_CASE      (   lowerCAmelCase     ,							lowerCAmelCase     ,							lowerCAmelCase       ):
       _UpperCamelCase														=    index
       _UpperCamelCase														=    2 * index + 1
       _UpperCamelCase														=    2 * index + 2
       if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
              _UpperCamelCase														=    left_index

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

       if largest != index:
              _UpperCamelCase							,		_UpperCamelCase														=    unsorted[index], unsorted[largest]
              heapify(lowerCAmelCase     ,							lowerCAmelCase     ,							lowerCAmelCase       )


def      SCREAMING_SNAKE_CASE      (   lowerCAmelCase       ):
       _UpperCamelCase														=    len(lowerCAmelCase       )
       for i in range(n // 2 - 1     ,							-1     ,							-1       ):
              heapify(lowerCAmelCase     ,							lowerCAmelCase     ,							lowerCAmelCase       )
       for i in range(n - 1     ,							0     ,							-1       ):
              _UpperCamelCase							,		_UpperCamelCase														=    unsorted[i], unsorted[0]
              heapify(lowerCAmelCase     ,							0     ,							lowerCAmelCase       )
       return unsorted


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






