



def   a_	(			__a		,							__a		,							__a      ):
     A__				=   index
     A__				=   2 * index + 1
     A__				=   2 * index + 2
     if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
          A__				=   left_index

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

     if largest != index:
          A__	,     A__				=   unsorted[index], unsorted[largest]
          heapify(__a		,							__a		,							__a      )



def   a_	(			__a      ):
     A__				=   len(__a      )
     for i in range(n // 2 - 1		,							-1		,							-1      ):
          heapify(__a		,							__a		,							__a      )
     for i in range(n - 1		,							0		,							-1      ):
          A__	,     A__				=   unsorted[i], unsorted[0]
          heapify(__a		,							0		,							__a      )
     return unsorted


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








"""simple docstring"""







def   a_	(			__a      ):
     if not isinstance(__a		,							__a      ):
          raise TypeError('''recursive_lucas_number accepts only integer arguments.'''      )
     if n_th_number == 0:
          return 2
     if n_th_number == 1:
          return 1

     return recursive_lucas_number(n_th_number - 1      ) + recursive_lucas_number(
         n_th_number - 2      )



def   a_	(			__a      ):
     if not isinstance(__a		,							__a      ):
          raise TypeError('''dynamic_lucas_number accepts only integer arguments.'''      )
     A__	,     A__				=   2, 1
     for _ in range(__a      ):
          A__	,     A__				=   b, a + b
     return a


if __name__ == "__main__":
 from doctest import testmod

 testmod()
 __snake_case	:				Dict  					=			int(input('Enter the number of terms in lucas series:\n').strip())
 print('Using recursive function to calculate lucas series:')
 print(' '.join(str(recursive_lucas_number(i)) for i in range(n)))
 print('\nUsing dynamic function to calculate lucas series:')
 print(' '.join(str(dynamic_lucas_number(i)) for i in range(n)))



