from __future__ import annotations

A_      =      10






def        __UpperCAmelCase    (       UpperCAmelCase       )->       list[int]:



			"""simple docstring"""







			lowercase							=		1
			lowercase							=		max(UpperCAmelCase       )
			while placement <= max_digit:
						# declare and initialize empty buckets
						lowercase							=		[[] for _ in range(UpperCAmelCase       )]
						# split list_of_ints between the buckets
						for i in list_of_ints:
									lowercase							=		int((i / placement) % RADIX       )
									buckets[tmp].append(UpperCAmelCase       )
						# put each buckets' contents into list_of_ints
						lowercase							=		0
						for b in range(UpperCAmelCase       ):
									for i in buckets[b]:
												lowercase							=		i
												a += 1
        # move to next
						placement *= RADIX
			return list_of_ints


if __name__ == "__main__":
						import doctest

						doctest.testmod()






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





