




def 	UpperCAmelCase_    (	__UpperCamelCase,				__UpperCamelCase,				__UpperCamelCase	):
    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(__UpperCamelCase,				__UpperCamelCase,				__UpperCamelCase	)



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


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












def 	UpperCAmelCase_    (	__UpperCamelCase,				__UpperCamelCase	):
    SCREAMING_SNAKE_CASE__								=1.0
    for i in range(1,				r + 1	):
        ret *= (n + 1 - i) / i
    return round(__UpperCamelCase	)



def 	UpperCAmelCase_    (	__UpperCamelCase	):
    return choose(8 + n,				__UpperCamelCase	) + choose(9 + n,				__UpperCamelCase	) - 10



def 	UpperCAmelCase_    (	__UpperCamelCase	):
    return sum(non_bouncy_exact(__UpperCamelCase	) for i in range(1,				n + 1	)	)



def 	UpperCAmelCase_    (	__UpperCamelCase = 100	):
    return non_bouncy_upto(__UpperCamelCase	)


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






