





from __future__ import annotations

def    __snake_case  (    _lowerCAmelCase       :       list , _lowerCAmelCase       :       int , _lowerCAmelCase       :       int , _lowerCAmelCase       :       int		)       ->  list:
   A_    : Optional[int]								=	[]
   A_					,  A_    : str								=	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		)		)
   A_    : Union[str, Any]								=	result + left + right
   return input_list

def    __snake_case  (    _lowerCAmelCase       :       list		)       ->  list:
   if len(__lowercase		) <= 1:
      return input_list
   A_    : List[Any]								=	list(__lowercase		)

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

   return input_list


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


import numpy as np






def        a_		(       __lowercase   :	np.array ) ->  np.array:
			return 1 / (1 + np.exp(-vector ))


if __name__ == "__main__":
			import doctest

			doctest.testmod()