


"""simple docstring"""






from __future__ import annotations

import math
import random



def 			A__		(					_UpperCAmelCase    :      int				,    _UpperCAmelCase    :      int				,    _UpperCAmelCase    :      int	)							->	list[int]:

	'''simple docstring'''


	snake_case__  :						List[Any]		=      d * e - 1
	snake_case__  :						Dict		=      0
	snake_case__  :						int		=      0
	while p == 0:
		snake_case__  :						Union[str, Any]		=      random.randint(2				,    n - 1	)
		snake_case__  :						int		=      k
		while True:
			if t % 2 == 0:
				snake_case__  :						Optional[int]		=      t // 2
				snake_case__  :						str		=      (g**t) % n
				snake_case__  :						Any		=      math.gcd(x - 1				,    _UpperCAmelCase	)
				if x > 1 and y > 1:
					snake_case__  :						List[str]		=      y
					snake_case__  :						Tuple		=      n // y
					break  # find the correct factors
			else:
				break  # t is not divisible by 2, break and choose another g
	return sorted([p, q]	)


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






