class 		a__						:

					def __init__(    self      :       List[str],_A      :       list    ):







							"""simple docstring"""






							SCREAMING_SNAKE_CASE_  :		Union[str, Any]				      =    set_counts
							SCREAMING_SNAKE_CASE_  :		List[Any]				      =    max(_A    )
							SCREAMING_SNAKE_CASE_  :		str				      =    len(_A    )
							SCREAMING_SNAKE_CASE_  :		List[str]				      =    [1] * num_sets
							SCREAMING_SNAKE_CASE_  :		Union[str, Any]				      =    list(range(_A    )    )

					def 				__UpperCamelCase   (    self      :       Union[str, Any],_A      :       int,_A      :       int    ):







							"""simple docstring"""






							SCREAMING_SNAKE_CASE_  :		Optional[Any]				      =    self.get_parent(_A    )
							SCREAMING_SNAKE_CASE_  :		Dict				      =    self.get_parent(_A    )

							if src_parent == dst_parent:
									return False

							if self.ranks[dst_parent] >= self.ranks[src_parent]:
									self.set_counts[dst_parent] += self.set_counts[src_parent]
									SCREAMING_SNAKE_CASE_  :		List[str]				      =    0
									SCREAMING_SNAKE_CASE_  :		Union[str, Any]				      =    dst_parent
									if self.ranks[dst_parent] == self.ranks[src_parent]:
											self.ranks[dst_parent] += 1
									SCREAMING_SNAKE_CASE_  :		str				      =    self.set_counts[dst_parent]
							else:
									self.set_counts[src_parent] += self.set_counts[dst_parent]
									SCREAMING_SNAKE_CASE_  :		Tuple				      =    0
									SCREAMING_SNAKE_CASE_  :		str				      =    src_parent
									SCREAMING_SNAKE_CASE_  :		Dict				      =    self.set_counts[src_parent]

							SCREAMING_SNAKE_CASE_  :		Optional[Any]				      =    max(self.max_set,_A    )
							return True






					def 				__UpperCamelCase   (    self      :       Any,_A      :       int    ):







							"""simple docstring"""






							if self.parents[disj_set] == disj_set:
									return disj_set
							SCREAMING_SNAKE_CASE_  :		str				      =    self.get_parent(self.parents[disj_set]    )
							return self.parents[disj_set]

def       _snake_case	(   lowerCAmelCase							:   list	):
		"""simple docstring"""







		SCREAMING_SNAKE_CASE_  :		Dict				      =    len(lowerCAmelCase	)
		for i in range(1   , lowerCAmelCase	):
				SCREAMING_SNAKE_CASE_  :		int				      =    collection[i]
				SCREAMING_SNAKE_CASE_  :		Any				      =    0
				SCREAMING_SNAKE_CASE_  :		Tuple				      =    i - 1

				while low <= high:
						SCREAMING_SNAKE_CASE_  :		int				      =    (low + high) // 2
						if val < collection[mid]:
								SCREAMING_SNAKE_CASE_  :		Optional[Any]				      =    mid - 1
						else:
								SCREAMING_SNAKE_CASE_  :		Tuple				      =    mid + 1
				for j in range(lowerCAmelCase   , lowerCAmelCase   , -1	):
						SCREAMING_SNAKE_CASE_  :		Union[str, Any]				      =    collection[j - 1]
				SCREAMING_SNAKE_CASE_  :		int				      =    val
		return collection


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