




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

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

							if largest != index:
														lowercase__  :	Any        =							unsorted[index], unsorted[largest]
														heapify(SCREAMING_SNAKE_CASE_    ,SCREAMING_SNAKE_CASE_    ,SCREAMING_SNAKE_CASE_    )
def  snake_case_					(		SCREAMING_SNAKE_CASE_    )      ->			List[Any]:
							lowercase__  :	List[Any]        =							len(SCREAMING_SNAKE_CASE_    )
							for i in range(n // 2 - 1    ,-1    ,-1    ):
														heapify(SCREAMING_SNAKE_CASE_    ,SCREAMING_SNAKE_CASE_    ,SCREAMING_SNAKE_CASE_    )
							for i in range(n - 1    ,0    ,-1    ):
														lowercase__  :	Optional[int]        =							unsorted[i], unsorted[0]
														heapify(SCREAMING_SNAKE_CASE_    ,0    ,SCREAMING_SNAKE_CASE_    )
							return unsorted


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





from __future__ import annotations

import math
import random
def  snake_case_					(		SCREAMING_SNAKE_CASE_    ,SCREAMING_SNAKE_CASE_    ,SCREAMING_SNAKE_CASE_    )      ->			list[int]:
							lowercase__  :	List[Any]        =							d * e - 1
							lowercase__  :	Any        =							0
							lowercase__  :	Dict        =							0
							while p == 0:
														lowercase__  :	Dict        =							random.randint(2    ,n - 1    )
														lowercase__  :	int        =							k
														while True:
																					if t % 2 == 0:
																												lowercase__  :	str        =							t // 2
																												lowercase__  :	int        =							(g**t) % n
																												lowercase__  :	List[Any]        =							math.gcd(x - 1    ,SCREAMING_SNAKE_CASE_    )
																												if x > 1 and y > 1:
																																			lowercase__  :	Any        =							y
																																			lowercase__  :	Optional[int]        =							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()