
def     UpperCamelCase      (					__lowerCamelCase  :				Optional[Any]       ,      __lowerCamelCase  :				List[str]       ,      __lowerCamelCase  :				Optional[Any]					):
       snake_case :     Tuple           =   index
       snake_case :     Union[str, Any]           =   2 * index + 1
       snake_case :     Optional[Any]           =   2 * index + 2
       if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
              snake_case :     Optional[Any]           =   left_index

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

       if largest != index:
              snake_case :     List[Any]           =   unsorted[index], unsorted[largest]
              heapify(__lowerCamelCase       ,      __lowerCamelCase       ,      __lowerCamelCase					)


def     UpperCamelCase      (					__lowerCamelCase  :				int					):
       snake_case :     Dict           =   len(__lowerCamelCase					)
       for i in range(n // 2 - 1       ,      -1       ,      -1					):
              heapify(__lowerCamelCase       ,      __lowerCamelCase       ,      __lowerCamelCase					)
       for i in range(n - 1       ,      0       ,      -1					):
              snake_case :     Optional[Any]           =   unsorted[i], unsorted[0]
              heapify(__lowerCamelCase       ,      0       ,      __lowerCamelCase					)
       return unsorted


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







def     UpperCamelCase      (					__lowerCamelCase  :				int = 998001					):
       snake_case :     Optional[Any]           =   0
       for i in range(999       ,      99       ,      -1					):  # 3 digit numbers range from 999 down to 100
              for j in range(999       ,      99       ,      -1					):
                     snake_case :     Tuple           =   str(i * j					)
                     if product_string == product_string[::-1] and i * j < n:
                            snake_case :     str           =   max(__lowerCamelCase       ,      i * j					)
       return answer


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





