






'''simple docstring'''


lowerCamelCase_				: Any    	=							'''Input must be a string of 8 numbers plus letter'''
lowerCamelCase_				: Optional[Any]    	=							'''TRWAGMYFPDXBNJZSQVHLCKE'''







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





						if not isinstance(_A						,      _A					):
												UpperCamelCase__         = f"Expected string as input, found {type(_A					).__name__}"
												raise TypeError(_A					)

						UpperCamelCase__         = spanish_id.replace("""-"""						,      """"""					).upper()
						if len(_A					) != 9:
												raise ValueError(_A					)

						try:
												UpperCamelCase__         = int(spanish_id_clean[0:8]					)
												UpperCamelCase__         = spanish_id_clean[8]
						except ValueError as ex:
												raise ValueError(_A					) from ex

						if letter.isdigit():
												raise ValueError(_A					)

						return letter == LOOKUP_LETTERS[number % 23]


if __name__ == "__main__":
					import doctest

					doctest.testmod()








'''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
