





'''simple docstring'''





def       A__(		__lowerCAmelCase	,			__lowerCAmelCase	,			__lowerCAmelCase ):

				if exponent == 1:
								return base
				if exponent % 2 == 0:
								_snake_case :			Any  						=   _modexpt(_lowerCamelCase	,			exponent // 2	,			_lowerCamelCase ) % modulo_value
								return (x * x) % modulo_value
				else:
								return (base * _modexpt(_lowerCamelCase	,			exponent - 1	,			_lowerCamelCase )) % modulo_value

def       A__(		__lowerCAmelCase = 17_77	,			__lowerCAmelCase = 18_55	,			__lowerCAmelCase = 8 ):
				_snake_case :			Dict  						=   base
				for _ in range(1	,			_lowerCamelCase ):
								_snake_case :			Optional[Any]  						=   _modexpt(_lowerCamelCase	,			_lowerCamelCase	,			10**digits )

				return result


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













def       A__(		__lowerCAmelCase ):
				assert column_title.isupper()
				_snake_case :			List[Any]  						=   0
				_snake_case :			List[str]  						=   len(__lowerCAmelCase ) - 1
				_snake_case :			Dict  						=   0

				while index >= 0:
								_snake_case :			List[str]  						=   (ord(column_title[index] ) - 64) * pow(26	,			__lowerCAmelCase )
								answer += value
								power += 1
								index -= 1

				return answer


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

		testmod()






