
"""simple docstring"""






def 		_snake_case			(      lowercase__						:    List[str] ,	lowercase__						:    Tuple ,	lowercase__						:    List[str]						)    ->							str:


			'''simple docstring'''





			lowerCAmelCase_       :List[str]     	=    index
			lowerCAmelCase_       :Dict     	=    2 * index + 1
			lowerCAmelCase_       :str     	=    2 * index + 2
			if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
						lowerCAmelCase_       :str     	=    left_index

			if right_index < heap_size and unsorted[right_index] > unsorted[largest]:
						lowerCAmelCase_       :Optional[int]     	=    right_index

			if largest != index:
						lowerCAmelCase_	,			lowerCAmelCase_       :Optional[Any]     	=    unsorted[index], unsorted[largest]
						heapify(lowercase__ ,	lowercase__ ,	lowercase__						)






def 		_snake_case			(      lowercase__						:    List[Any]						)    ->							List[str]:


			'''simple docstring'''





			lowerCAmelCase_       :Any     	=    len(lowercase__						)
			for i in range(n // 2 - 1 ,	-1 ,	-1						):
						heapify(lowercase__ ,	lowercase__ ,	lowercase__						)
			for i in range(n - 1 ,	0 ,	-1						):
						lowerCAmelCase_	,			lowerCAmelCase_       :List[Any]     	=    unsorted[i], unsorted[0]
						heapify(lowercase__ ,	0 ,	lowercase__						)
			return unsorted


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








"""simple docstring"""






import math






def 		_snake_case			(      lowercase__						:    int						)    ->							int:


			'''simple docstring'''





			return sum(int(lowercase__						) for digit in str(lowercase__						)						)






def 		_snake_case			(      lowercase__						:    int = 3_0						)    ->							int:


			'''simple docstring'''





			lowerCAmelCase_       :Union[str, Any]     	=    []
			for digit in range(2 ,	1_0_0						):
						for power in range(2 ,	1_0_0						):
									lowerCAmelCase_       :Tuple     	=    int(math.pow(lowercase__ ,	lowercase__						)						)
									if digit == digit_sum(lowercase__						):
												digit_to_powers.append(lowercase__						)

			digit_to_powers.sort()
			return digit_to_powers[n - 1]


if __name__ == "__main__":
				print(solution())






