



'''simple docstring'''




from __future__ import annotations


def        lowerCAmelCase_     (			_lowerCamelCase:     list ,   _lowerCamelCase:     int ,   _lowerCamelCase:     int ,   _lowerCamelCase:     int      ):
		__SCREAMING_SNAKE_CASE :	List[Any]					 =	[]
		__SCREAMING_SNAKE_CASE :	Optional[int]					 =	input_list[low:mid], input_list[mid : high + 1]
		while left and right:
				result.append((left if left[0] <= right[0] else right).pop(0      )      )
		__SCREAMING_SNAKE_CASE :	Optional[int]					 =	result + left + right
		return input_list


def        lowerCAmelCase_     (			_lowerCamelCase:     list      ):
		if len(_lowerCamelCase      ) <= 1:
				return input_list
		__SCREAMING_SNAKE_CASE :	Any					 =	list(_lowerCamelCase      )

		# iteration for two-way merging
		__SCREAMING_SNAKE_CASE :	Tuple					 =	2
		while p <= len(_lowerCamelCase      ):
				# getting low, high and middle value for merge-sort of single list
				for i in range(0 ,   len(_lowerCamelCase      ) ,   _lowerCamelCase      ):
						__SCREAMING_SNAKE_CASE :	Union[str, Any]					 =	i
						__SCREAMING_SNAKE_CASE :	Tuple					 =	i + p - 1
						__SCREAMING_SNAKE_CASE :	Dict					 =	(low + high + 1) // 2
						__SCREAMING_SNAKE_CASE :	int					 =	merge(_lowerCamelCase ,   _lowerCamelCase ,   _lowerCamelCase ,   _lowerCamelCase      )
				# final merge of last two parts
				if p * 2 >= len(_lowerCamelCase      ):
						__SCREAMING_SNAKE_CASE :	str					 =	i
						__SCREAMING_SNAKE_CASE :	Any					 =	merge(_lowerCamelCase ,   0 ,   _lowerCamelCase ,   len(_lowerCamelCase      ) - 1      )
						break
				p *= 2

		return input_list


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




'''simple docstring'''




from ..utils import DummyObject, requires_backends






class 		_UpperCamelCase						(							metaclass=lowerCamelCase__					):


			'''simple docstring'''

			_A   :	Optional[int]    					=	['''onnx''']

			def __init__(							self  :				List[str]							,  *lowerCAmelCase__  :				Optional[int]							,  **lowerCAmelCase__  :				List[Any]		):





					"""simple docstring"""






					requires_backends(self							,  ["""onnx"""]		)

			@classmethod
			def UpperCamelCase__      (							cls  :				Optional[int]							,  *lowerCAmelCase__  :				int							,  **lowerCAmelCase__  :				int		):





					"""simple docstring"""






					requires_backends(cls							,  ["""onnx"""]		)



			@classmethod
			def UpperCamelCase__      (							cls  :				Tuple							,  *lowerCAmelCase__  :				List[str]							,  **lowerCAmelCase__  :				Optional[Any]		):





					"""simple docstring"""






					requires_backends(cls							,  ["""onnx"""]		)