





lowercase     :			Dict     						=	"""
# Diffusers installation
! pip install diffusers transformers datasets accelerate
# To install from source instead of the last release, comment the command above and uncomment the following one.
# ! pip install git+https://github.com/huggingface/diffusers.git
"""

lowercase     :			Optional[Any]     						=	[{"""type""": """code""", """content""": INSTALL_CONTENT}]













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))






