





'''simple docstring'''






def 					_a						(       _lowerCamelCase    ,	_lowerCamelCase ) ->				int:



			"""simple docstring"""


			while a != 0:
						__snake_case      ,     __snake_case					:      str							      =     b % a, a
			return b







def 					_a						(       _lowerCamelCase    ,	_lowerCamelCase ) ->				int:



			"""simple docstring"""


			if gcd(_lowerCamelCase    ,	_lowerCamelCase ) != 1:
						__snake_case					:      Any							      =     F'''mod inverse of {a!r} and {m!r} does not exist'''
						raise ValueError(_lowerCamelCase )
			__snake_case      ,     __snake_case      ,     __snake_case					:      Dict							      =     1, 0, a
			__snake_case      ,     __snake_case      ,     __snake_case					:      List[Any]							      =     0, 1, m
			while va != 0:
						__snake_case					:      List[str]							      =     ua // va
						__snake_case      ,     __snake_case      ,     __snake_case      ,     __snake_case      ,     __snake_case      ,     __snake_case					:      Union[str, Any]							      =     (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
			return ua % m









'''simple docstring'''






from __future__ import annotations







def 					_a						(       _lowerCamelCase    ,	_lowerCamelCase = None    ,	_lowerCamelCase = None ) ->				None:



			"""simple docstring"""


			if start is None:
						__snake_case					:      Optional[Any]							      =     0

			if end is None:
						__snake_case					:      Optional[Any]							      =     len(_lowerCamelCase ) - 1

			if start >= end:
						return

			__snake_case					:      Tuple							      =     (start + end) // 2

			slowsort(_lowerCamelCase    ,	_lowerCamelCase    ,	_lowerCamelCase )
			slowsort(_lowerCamelCase    ,	mid + 1    ,	_lowerCamelCase )

			if sequence[end] < sequence[mid]:
						__snake_case      ,     __snake_case					:      str							      =     sequence[mid], sequence[end]

			slowsort(_lowerCamelCase    ,	_lowerCamelCase    ,	end - 1 )


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

	testmod()


