def        __UpperCAmelCase    (       UpperCAmelCase       )->       Optional[Any]:



			"""simple docstring"""







			stooge(__snake_case,		0,		len(__snake_case       ) - 1       )
			return arr






def        __UpperCAmelCase    (       UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase       )->       List[Any]:



			"""simple docstring"""







			if i >= h:
						return

			# If first element is smaller than the last then swap them
			if arr[i] > arr[h]:
						lowercase		,lowercase							=		arr[h], arr[i]

			# If there are more than 2 elements in the array
			if h - i + 1 > 2:
						lowercase							=		(int)((h - i + 1) / 3       )

						# Recursively sort first 2/3 elements
						stooge(__snake_case,		__snake_case,		(h - t)       )

						# Recursively sort last 2/3 elements
						stooge(__snake_case,		i + t,		(__snake_case)       )

						# Recursively sort first 2/3 elements
						stooge(__snake_case,		__snake_case,		(h - t)       )


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






def        __UpperCAmelCase    (       UpperCAmelCase,		UpperCAmelCase       )->       int:



			"""simple docstring"""







			while a != 0:
						lowercase		,lowercase							=		b % a, a
			return b






def        __UpperCAmelCase    (       UpperCAmelCase,		UpperCAmelCase       )->       int:



			"""simple docstring"""







			if gcd(UpperCAmelCase,		UpperCAmelCase       ) != 1:
						lowercase							=		f'mod inverse of {a!r} and {m!r} does not exist'
						raise ValueError(UpperCAmelCase       )
			lowercase		,lowercase		,lowercase							=		1, 0, a
			lowercase		,lowercase		,lowercase							=		0, 1, m
			while va != 0:
						lowercase							=		ua // va
						lowercase		,lowercase		,lowercase		,lowercase		,lowercase		,lowercase							=		(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
			return ua % m





