
'''simple docstring'''





from __future__ import annotations

def   A			(							A_				:       List[Any]     ,				A_				:       List[Any]							):
						snake_case							:  Union[str, Any]			=     0
						snake_case							:  Any			=     len(A_							) - 1
						while left <= right:
												snake_case							:  str			=     (left + right) // 2
												if left == right:
																		if sorted_list[middle] < item:
																								snake_case							:  Any			=     middle + 1
																		break
												elif sorted_list[middle] < item:
																		snake_case							:  List[Any]			=     middle + 1
												else:
																		snake_case							:  str			=     middle - 1
						sorted_list.insert(A_     ,				A_							)
						return sorted_list

def   A			(							A_				:       Dict     ,				A_				:       Optional[int]							):
						snake_case							:  Any			=     []
						while left and right:
												if left[0][0] < right[0][0]:
																		result.append(left.pop(0							)							)
												else:
																		result.append(right.pop(0							)							)
						return result + left + right

def   A			(							A_				:       Any							):
						snake_case							:  Any			=     len(A_							)
						if length <= 1:
												return list_ad
						snake_case							:  List[str]			=     length // 2
						return merge(sortlist_ad(list_ad[:middle]							)     ,				sortlist_ad(list_ad[middle:]							)							)

def   A			(							A_				:       list[int]							):

						if len(A_							) <= 1:
												return collection
						snake_case							:  List[Any]			=     []
						snake_case							:  Union[str, Any]			=     False
						for i in range(0     ,				len(A_							)     ,				2							):
												if i == len(A_							) - 1:
																		snake_case							:  Tuple			=     True
												else:
																		if collection[i] < collection[i + 1]:
																								two_paired_list.append([collection[i], collection[i + 1]]							)
																		else:
																								two_paired_list.append([collection[i + 1], collection[i]]							)
						snake_case							:  Dict			=     sortlist_ad(A_							)
						snake_case							:  List[Any]			=     [i[0] for i in sorted_list_ad]
						result.append(sorted_list_ad[-1][1]							)
						if has_last_odd_item:
												snake_case							:  Dict			=     collection[-1]
												snake_case							:  Optional[Any]			=     binary_search_insertion(A_     ,				A_							)
						snake_case							:  Union[str, Any]			=     False
						for i in range(len(A_							) - 1							):
												if result[i] == collection[-1] and has_last_odd_item:
																		snake_case							:  Dict			=     True
												snake_case							:  Any			=     sorted_list_ad[i][1]
												# If last_odd_item is inserted before the item's index,
												# you should forward index one more.
												if is_last_odd_item_inserted_before_this_index:
																		snake_case							:  Any			=     result[: i + 2] + binary_search_insertion(result[i + 2 :]     ,				A_							)
												else:
																		snake_case							:  Optional[int]			=     result[: i + 1] + binary_search_insertion(result[i + 1 :]     ,				A_							)

						return result


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




from hashlib import mda, shaaaa

A__							=				(shaaaa, mda)

class 					__UpperCamelCase					:







	def __init__( self:			Optional[int]	,			__UpperCamelCase:			int = 8   ):

						'''simple docstring'''





						__magic_name__				=     0b0
						__magic_name__				=     size







	def 						_SCREAMING_SNAKE_CASE				( self:			Tuple	,			__UpperCamelCase:			str   ):

						'''simple docstring'''





						__magic_name__				=     self.hash_(__UpperCamelCase   )
						self.bitarray |= h







	def 						_SCREAMING_SNAKE_CASE				( self:			List[str]	,			__UpperCamelCase:			str   ):

						'''simple docstring'''





						__magic_name__				=     self.hash_(__UpperCamelCase   )
						return (h & self.bitarray) == h







	def __contains__( self:			Optional[int]	,			__UpperCamelCase:			str   ):

						'''simple docstring'''





						return self.exists(__UpperCamelCase   )







	def 						_SCREAMING_SNAKE_CASE				( self:			int	,			__UpperCamelCase:			int   ):

						'''simple docstring'''





						__magic_name__				=     bin(__UpperCamelCase   )[2:]
						return res.zfill(self.size   )







	@property
	def 						_SCREAMING_SNAKE_CASE				( self:			str   ):

						'''simple docstring'''





						return self.format_bin(self.bitarray   )







	def 						_SCREAMING_SNAKE_CASE				( self:			str	,			__UpperCamelCase:			str   ):

						'''simple docstring'''





						__magic_name__				=     0b0
						for func in HASH_FUNCTIONS:
											__magic_name__				=     (
											    int.from_bytes(func(value.encode()   ).digest()	,			'little'   ) % self.size
											)
											res |= 2**position
						return res







	def 						_SCREAMING_SNAKE_CASE				( self:			Dict	,			__UpperCamelCase:			str   ):

						'''simple docstring'''





						return self.format_bin(self.hash_(__UpperCamelCase   )   )







	@property
	def 						_SCREAMING_SNAKE_CASE				( self:			Optional[int]   ):

						'''simple docstring'''





						__magic_name__				=     bin(self.bitarray   ).count('1'   )
						return (n_ones / self.size) ** len(__UpperCamelCase   )




