

a__												=						'''Input must be a string of 8 numbers plus letter'''
a__												=						'''TRWAGMYFPDXBNJZSQVHLCKE'''



def   __UpperCAmelCase					(      __a :     str      )     ->	bool:

					"""simple docstring"""

					if not isinstance(__a						,__a      ):
										_a      :       List[str]   =						F"""Expected string as input, found {type(__a      ).__name__}"""
										raise TypeError(__a      )

					_a      :       List[Any]   =						spanish_id.replace('''-'''						,''''''      ).upper()
					if len(__a      ) != 9:
										raise ValueError(__a      )

					try:
										_a      :       Any   =						int(spanish_id_clean[0:8]      )
										_a      :       str   =						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()










def 						A_							(	_lowerCAmelCase				,  _lowerCAmelCase	)		->					Optional[int]:
 UpperCamelCase      :   List[Any]			      =  [1]
 for i in range(2				,  _lowerCAmelCase	):
  factorials.append(factorials[-1] * i	)
 assert 0 <= k < factorials[-1] * n, "k out of bounds"

 UpperCamelCase      :   Tuple			      =  []
 UpperCamelCase      :   str			      =  list(range(_lowerCAmelCase	)	)

 # Find permutation
 while factorials:
  UpperCamelCase      :   int			      =  factorials.pop()
  UpperCamelCase      ,       UpperCamelCase      :   int			      =  divmod(_lowerCAmelCase				,  _lowerCAmelCase	)
  permutation.append(elements[number]	)
  elements.remove(elements[number]	)
 permutation.append(elements[0]	)

 return permutation


if __name__ == "__main__":
    import doctest

    doctest.testmod()
