
"""simple docstring"""







from collections.abc import Iterable
from typing import Generic, TypeVar

_SCREAMING_SNAKE_CASE	       =      TypeVar("""_T""")







class 							__magic_name__     (		Generic[_T]   ):





					def __init__(				self   :							Tuple							,						snake_case_   :							Iterable[_T] | None = None    ):
												__snake_case     			=       list(iterable or []    )
												__snake_case     			=       []





					def __len__(				self   :							Optional[int]    ):
												return len(self._stacka    ) + len(self._stacka    )





					def __repr__(				self   :							Union[str, Any]    ):
												return F'''Queue({tuple(self._stacka[::-1] + self._stacka    )})'''





					def 							lowerCAmelCase      (				self   :							int							,						snake_case_   :							_T    ):
												self._stacka.append(snake_case_    )





					def 							lowerCAmelCase      (				self   :							Union[str, Any]    ):
												__snake_case     			=       self._stacka.pop
												__snake_case     			=       self._stacka.append

												if not self._stacka:
																			while self._stacka:
																										stacka_append(stacka_pop()    )

												if not self._stacka:
																			raise IndexError("Queue is empty"    )
												return self._stacka.pop()


if __name__ == "__main__":
		from doctest import testmod

		testmod()


"""simple docstring"""







def   __UpperCamelCase   (					SCREAMING_SNAKE_CASE )  ->     list:







							"""simple docstring"""


							__snake_case     			=       len(SCREAMING_SNAKE_CASE )
							for i in range(1							,    SCREAMING_SNAKE_CASE ):
														__snake_case     			=       collection[i]
														__snake_case     			=       0
														__snake_case     			=       i - 1

														while low <= high:
																					__snake_case     			=       (low + high) // 2
																					if val < collection[mid]:
																												__snake_case     			=       mid - 1
																					else:
																												__snake_case     			=       mid + 1
														for j in range(SCREAMING_SNAKE_CASE							,    SCREAMING_SNAKE_CASE							,    -1 ):
																					__snake_case     			=       collection[j - 1]
														__snake_case     			=       val
							return collection


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