

from __future__ import annotations





def 							__a       (					__A	):
    if len(__A	) == 0:
        raise ValueError("find_min() arg is an empty sequence"	)
    SCREAMING_SNAKE_CASE__					     =						nums[0]
    for num in nums:
        SCREAMING_SNAKE_CASE__					     =						min(__A ,       __A	)
    return min_num


if __name__ == "__main__":
  import doctest

  doctest.testmod(verbose=True)





def 							__a       (					__A ,       __A ,       __A	):
    SCREAMING_SNAKE_CASE__					     =						index
    SCREAMING_SNAKE_CASE__					     =						2 * index + 1
    SCREAMING_SNAKE_CASE__					     =						2 * index + 2
    if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
        SCREAMING_SNAKE_CASE__					     =						left_index

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

    if largest != index:
        SCREAMING_SNAKE_CASE__     ,		SCREAMING_SNAKE_CASE__					     =						unsorted[index], unsorted[largest]
        heapify(__A ,       __A ,       __A	)





def 							__a       (					__A	):
    SCREAMING_SNAKE_CASE__					     =						len(__A	)
    for i in range(n // 2 - 1 ,       -1 ,       -1	):
        heapify(__A ,       __A ,       __A	)
    for i in range(n - 1 ,       0 ,       -1	):
        SCREAMING_SNAKE_CASE__     ,		SCREAMING_SNAKE_CASE__					     =						unsorted[i], unsorted[0]
        heapify(__A ,       0 ,       __A	)
    return unsorted


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


