



"""simple docstring"""






from __future__ import annotations


def 			_lowercase				(  __snake_case					,__snake_case					,__snake_case					,__snake_case	)						->   list:
			__lowerCAmelCase      :  Dict												=       []
			__lowerCAmelCase						,	__lowerCAmelCase      :  Any												=       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	)	)
			__lowerCAmelCase      :  int												=       result + left + right
			return input_list


def 			_lowercase				(  __snake_case	)						->   list:
			if len(__snake_case	) <= 1:
						return input_list
			__lowerCAmelCase      :  int												=       list(__snake_case	)

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

			return input_list


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




"""simple docstring"""






from ..utils import DummyObject, requires_backends



class 			A__   (  metaclass=__SCREAMING_SNAKE_CASE							):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE          =	['torch', 'torchsde']

	def __init__(     self:		int       ,			*_SCREAMING_SNAKE_CASE:		Optional[Any]       ,			**_SCREAMING_SNAKE_CASE:		str)				->       Dict:

				"""simple docstring"""

				requires_backends(self       ,			["torch", "torchsde"])

	@classmethod
	def 							_SCREAMING_SNAKE_CASE   (     cls:		Optional[Any]       ,			*_SCREAMING_SNAKE_CASE:		Optional[int]       ,			**_SCREAMING_SNAKE_CASE:		Optional[int])				->       Optional[Any]:

				"""simple docstring"""

				requires_backends(cls       ,			["torch", "torchsde"])







	@classmethod
	def 							_SCREAMING_SNAKE_CASE   (     cls:		Dict       ,			*_SCREAMING_SNAKE_CASE:		List[Any]       ,			**_SCREAMING_SNAKE_CASE:		Any)				->       Optional[int]:

				"""simple docstring"""

				requires_backends(cls       ,			["torch", "torchsde"])