
'''simple docstring'''
def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE				):
							_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__":
				__lowerCAmelCase												=	input('Enter numbers separated by a comma:\n').strip()
				__lowerCAmelCase												=	[int(item) for item in user_input.split(',')]
				print(binary_insertion_sort(unsorted))

'''simple docstring'''
def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE				):

							if not (isinstance(_SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE				) and isinstance(_SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE				)):
														raise ValueError("""longest_common_substring() takes two strings for inputs"""				)

							_snake_case       =  len(_SCREAMING_SNAKE_CASE				)
							_snake_case       =  len(_SCREAMING_SNAKE_CASE				)

							_snake_case       =  [[0] * (texta_length + 1) for _ in range(texta_length + 1				)]
							_snake_case       =  0
							_snake_case       =  0

							for i in range(1							, texta_length + 1				):
														for j in range(1							, texta_length + 1				):
																					if texta[i - 1] == texta[j - 1]:
																												_snake_case       =  1 + dp[i - 1][j - 1]
																												if dp[i][j] > ans_length:
																																			_snake_case       =  i
																																			_snake_case       =  dp[i][j]

							return texta[ans_index - ans_length : ans_index]


if __name__ == "__main__":
				import doctest

				doctest.testmod()