




'''simple docstring'''





def 					UpperCamelCase_(     snake_case							:	list					):

							'''simple docstring'''






							if any(not isinstance(snake_case							,    snake_case					) or x < 0 for x in sequence					):
														raise TypeError("Sequence must be list of non-negative integers"					)
							for _ in range(len(snake_case					)					):
														for i, (rod_upper, rod_lower) in enumerate(zip(snake_case							,    sequence[1:]					)					):
																					if rod_upper > rod_lower:
																												sequence[i] -= rod_upper - rod_lower
																												sequence[i + 1] += rod_upper - rod_lower
							return sequence


if __name__ == "__main__":
		assert bead_sort([5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5]
		assert bead_sort([7, 9, 4, 3, 5]) == [3, 4, 5, 7, 9]










'''simple docstring'''





def 					UpperCamelCase_(     snake_case							:	int							,    snake_case							:	int					):

							'''simple docstring'''






							while b:
														snake_case_ ,				snake_case_      =				b, a % b
							return a


def 					UpperCamelCase_(     snake_case							:	int							,    snake_case							:	int					):

							'''simple docstring'''






							return a if b == 0 else euclidean_gcd_recursive(snake_case							,    a % b					)


def 					UpperCamelCase_(     ):

							'''simple docstring'''






							print(f'euclidean_gcd(3, 5) = {euclidean_gcd(3							,    5					)}'					)
							print(f'euclidean_gcd(5, 3) = {euclidean_gcd(5							,    3					)}'					)
							print(f'euclidean_gcd(1, 3) = {euclidean_gcd(1							,    3					)}'					)
							print(f'euclidean_gcd(3, 6) = {euclidean_gcd(3							,    6					)}'					)
							print(f'euclidean_gcd(6, 3) = {euclidean_gcd(6							,    3					)}'					)

							print(f'euclidean_gcd_recursive(3, 5) = {euclidean_gcd_recursive(3							,    5					)}'					)
							print(f'euclidean_gcd_recursive(5, 3) = {euclidean_gcd_recursive(5							,    3					)}'					)
							print(f'euclidean_gcd_recursive(1, 3) = {euclidean_gcd_recursive(1							,    3					)}'					)
							print(f'euclidean_gcd_recursive(3, 6) = {euclidean_gcd_recursive(3							,    6					)}'					)
							print(f'euclidean_gcd_recursive(6, 3) = {euclidean_gcd_recursive(6							,    3					)}'					)


if __name__ == "__main__":
		main()




