






'''simple docstring'''


# Algorithm for the pigeonhole sorting









def 	__magic_name__( _A					):
						'''simple docstring'''





						UpperCamelCase__         = min(_A					)  # min() finds the minimum value
						UpperCamelCase__         = max(_A					)  # max() finds the maximum value

						UpperCamelCase__         = max_val - min_val + 1  # size is difference of max and min values plus one

						# list of pigeonholes of size equal to the variable size
						UpperCamelCase__         = [0] * size

						# Populate the pigeonholes.
						for x in a:
												assert isinstance(_A						,      _A					), "integers only please"
												holes[x - min_val] += 1

						# Putting the elements back into the array in an order.
						UpperCamelCase__         = 0
						for count in range(_A					):
												while holes[count] > 0:
																		holes[count] -= 1
																		UpperCamelCase__         = count + min_val
																		i += 1







def 	__magic_name__( ):
						'''simple docstring'''





						UpperCamelCase__         = [8, 3, 2, 7, 4, 6, 8]
						pigeonhole_sort(_A					)
						print("""Sorted order is:"""						,      """ """.join(_A					)					)


if __name__ == "__main__":
					main()








'''simple docstring'''


import math







def 	__magic_name__( _A					):
						'''simple docstring'''





						assert isinstance(_A						,      _A					) and (
						    number >= 0
						), "'number' must been an int and positive"

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

						UpperCamelCase__         = range(3						,      int(math.sqrt(_A					) + 1					)						,      2					)
						return not any(not number % i for i in odd_numbers					)







def 	__magic_name__( _A						,      _A=1						,      **_A					):
						'''simple docstring'''





						UpperCamelCase__         = factor * value
						UpperCamelCase__         = value

						while not is_prime(_A					):
												value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

						if value == first_value_val:
												return next_prime(value + 1						,      **_A					)
						return value
