



def  _lowerCAmelCase     (_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_			= unsorted[index], unsorted[largest]
										heapify(_lowerCAmelCase ,						_lowerCAmelCase ,						_lowerCAmelCase)



def  _lowerCAmelCase     (_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_			= unsorted[i], unsorted[0]
										heapify(_lowerCAmelCase ,						0 ,						_lowerCAmelCase)
					return unsorted


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





'''simple docstring'''







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE = 1000     ):
		return sum(i for i in range(SCREAMING_SNAKE_CASE     ) if i % 3 == 0 or i % 5 == 0     )


if __name__ == "__main__":
							print(f"""{solution() = }""")
