

def    __lowerCamelCase      (					UpperCamelCase__ ):







							'''simple docstring'''






							if any(not isinstance(UpperCamelCase__  ,				UpperCamelCase__ ) or x < 0 for x in sequence ):
														raise TypeError('Sequence must be list of non-negative integers' )
							for _ in range(len(UpperCamelCase__ ) ):
														for i, (rod_upper, rod_lower) in enumerate(zip(UpperCamelCase__  ,				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]







from math import sqrt





def    __lowerCamelCase      (					UpperCamelCase__ ):







							'''simple docstring'''






							if 1 < number < 4:
														# 2 and 3 are primes
														return True
							elif number < 2 or number % 2 == 0 or number % 3 == 0:
														# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
														return False

							# All primes number are in format of 6k +/- 1
							for i in range(5  ,				int(sqrt(UpperCamelCase__ ) + 1 )  ,				6 ):
														if number % i == 0 or number % (i + 2) == 0:
																					return False
							return True





def    __lowerCamelCase      (					UpperCamelCase__ = 10001 ):







							'''simple docstring'''






							snake_case_     							=       0
							snake_case_     							=       1
							while count != nth and number < 3:
														number += 1
														if is_prime(UpperCamelCase__ ):
																					count += 1
							while count != nth:
														number += 2
														if is_prime(UpperCamelCase__ ):
																					count += 1
							return number


if __name__ == "__main__":
					print(F'''{solution() = }''')




