

def  UpperCAmelCase_   (_lowerCAmelCase :		Tuple     ,			_lowerCAmelCase :		Optional[Any]     ,			_lowerCAmelCase :		Dict     ,			_lowerCAmelCase :		Optional[Any]		):







			if start == end:
						return start if lst[start] > item else start + 1
			if start > end:
						return start

			__UpperCamelCase    :    Any								=      (start + end) // 2
			if lst[mid] < item:
						return binary_search(_lowerCAmelCase     ,			_lowerCAmelCase     ,			mid + 1     ,			_lowerCAmelCase		)
			elif lst[mid] > item:
						return binary_search(_lowerCAmelCase     ,			_lowerCAmelCase     ,			_lowerCAmelCase     ,			mid - 1		)
			else:
						return mid







def  UpperCAmelCase_   (_lowerCAmelCase :		Any		):
			__UpperCamelCase    :    Any								=      len(_lowerCAmelCase		)

			for index in range(1     ,			_lowerCAmelCase		):
						__UpperCamelCase    :    Tuple								=      lst[index]
						__UpperCamelCase    :    Tuple								=      binary_search(_lowerCAmelCase     ,			_lowerCAmelCase     ,			0     ,			index - 1		)
						__UpperCamelCase    :    Union[str, Any]								=      lst[:pos] + [value] + lst[pos:index] + lst[index + 1 :]

			return lst







def  UpperCAmelCase_   (_lowerCAmelCase :		Tuple     ,			_lowerCAmelCase :		Dict		):







			if not left:
						return right

			if not right:
						return left

			if left[0] < right[0]:
						return [left[0], *merge(left[1:]     ,			_lowerCAmelCase		)]

			return [right[0], *merge(_lowerCAmelCase     ,			right[1:]		)]







def  UpperCAmelCase_   (_lowerCAmelCase :		Any		):
			__UpperCamelCase    :    Dict								=      len(_lowerCAmelCase		)
			__UpperCamelCase							,				__UpperCamelCase    :    str								=      [], []
			__UpperCamelCase    :    Optional[Any]								=      [lst[0]]
			__UpperCamelCase    :    List[str]								=      []
			__UpperCamelCase    :    Optional[int]								=      1
			while i < length:
						if lst[i] < lst[i - 1]:
									runs.append(_lowerCAmelCase		)
									__UpperCamelCase    :    List[Any]								=      [lst[i]]
						else:
									new_run.append(lst[i]		)
						i += 1
			runs.append(_lowerCAmelCase		)

			for run in runs:
						sorted_runs.append(insertion_sort(_lowerCAmelCase		)		)
			for run in sorted_runs:
						__UpperCamelCase    :    Tuple								=      merge(_lowerCAmelCase     ,			_lowerCAmelCase		)

			return sorted_array







def  UpperCAmelCase_   ():
			__UpperCamelCase    :    List[Any]								=      [5, 9, 10, 3, -4, 5, 1_78, 92, 46, -18, 0, 7]
			__UpperCamelCase    :    Tuple								=      tim_sort(_lowerCAmelCase		)
			print(_lowerCAmelCase		)


if __name__ == "__main__":
					main()


import numpy as np

lowercase     :       Union[str, Any]        =       [
    ["a", "b", "c", "d", "e"],
    ["f", "g", "h", "i", "k"],
    ["l", "m", "n", "o", "p"],
    ["q", "r", "s", "t", "u"],
    ["v", "w", "x", "y", "z"],
]
class 		SCREAMING_SNAKE_CASE__					:







						"""simple docstring"""




						def __init__(				self    )							->	None:




									'''simple docstring'''


									__UpperCamelCase    :    Union[str, Any]								=      np.array(__UpperCamelCase    )

						def __lowerCamelCase					(				self , __UpperCamelCase    )							->	np.ndarray:




									'''simple docstring'''


									__UpperCamelCase							,				__UpperCamelCase    :    List[Any]								=      np.where(letter == self.SQUARE    )
									__UpperCamelCase    :    Tuple								=      np.concatenate([indexa + 1, indexa + 1]    )
									return indexes

						def __lowerCamelCase					(				self , __UpperCamelCase , __UpperCamelCase    )							->	str:




									'''simple docstring'''


									return self.SQUARE[indexa - 1, indexa - 1]

						def __lowerCamelCase					(				self , __UpperCamelCase    )							->	str:




									'''simple docstring'''


									__UpperCamelCase    :    int								=      message.lower()
									__UpperCamelCase    :    List[Any]								=      message.replace("j" , "i"    )

									__UpperCamelCase    :    Dict								=      ""
									for letter_index in range(len(__UpperCamelCase    )    ):
												if message[letter_index] != " ":
															__UpperCamelCase    :    int								=      self.letter_to_numbers(message[letter_index]    )
															__UpperCamelCase    :    Optional[int]								=      encoded_message + str(numbers[0]    ) + str(numbers[1]    )
												elif message[letter_index] == " ":
															__UpperCamelCase    :    List[str]								=      encoded_message + " "

									return encoded_message




						def __lowerCamelCase					(				self , __UpperCamelCase    )							->	str:




									'''simple docstring'''


									__UpperCamelCase    :    Dict								=      message.replace(" " , "  "    )
									__UpperCamelCase    :    Optional[int]								=      ""
									for numbers_index in range(int(len(__UpperCamelCase    ) / 2    )    ):
												if message[numbers_index * 2] != " ":
															__UpperCamelCase    :    int								=      message[numbers_index * 2]
															__UpperCamelCase    :    Optional[int]								=      message[numbers_index * 2 + 1]

															__UpperCamelCase    :    str								=      self.numbers_to_letter(int(__UpperCamelCase    ) , int(__UpperCamelCase    )    )
															__UpperCamelCase    :    Optional[Any]								=      decoded_message + letter
												elif message[numbers_index * 2] == " ":
															__UpperCamelCase    :    str								=      decoded_message + " "

									return decoded_message