


"""simple docstring"""
SCREAMING_SNAKE_CASE					:       List[str]							   =							{hex(i)[2:]: i for i in range(16)}  # Use [:2] to strip off the leading '0x'






def 						lowercase				(	_snake_case		: str	)	->int:
	"""simple docstring"""





	__snake_case      :		List[str]         =							hex_string.strip().lower()
	if not hex_string:
		raise ValueError('''Empty string was passed to the function'''	)
	__snake_case      :		Any         =							hex_string[0] == '''-'''
	if is_negative:
		__snake_case      :		Optional[int]         =							hex_string[1:]
	if not all(char in hex_table for char in hex_string	):
		raise ValueError('''Non-hexadecimal value was passed to the function'''	)
	__snake_case      :		str         =							0
	for char in hex_string:
		__snake_case      :		Tuple         =							16 * decimal_number + hex_table[char]
	return -decimal_number if is_negative else decimal_number


if __name__ == "__main__":
			from doctest import testmod

			testmod()








"""simple docstring"""





def 							_lowerCAmelCase   (    UpperCAmelCase  :				int   ,				UpperCAmelCase  :				int   ,				UpperCAmelCase  :				int					):


					'''simple docstring'''






					if power < 0:
										return -1
					base %= mod
					UpperCamelCase__		:     Any								=1

					while power > 0:
										if power & 1:
															UpperCamelCase__		:     Optional[Any]								=(result * base) % mod
										UpperCamelCase__		:     Union[str, Any]								=power >> 1
										UpperCamelCase__		:     Union[str, Any]								=(base * base) % mod

					return result



def 							_lowerCAmelCase   (    ):


					'''simple docstring'''






					print(modular_exponential(3   ,				200   ,				13					)					)


if __name__ == "__main__":
				import doctest

				doctest.testmod()

				main()


