'''simple docstring'''




def     snake_case__							(      _A: Optional[int]				,       _A: Optional[Any]				,       _A: str			)   ->     Any:
		assert b != 0, "This cannot accept modulo that is == 0"
		if n == 0:
				return 1

		if n % 2 == 1:
				return (bin_exp_mod(_A				,       n - 1				,       _A			) * a) % b

		lowerCAmelCase        =  bin_exp_mod(_A				,       n / 2				,       _A			)
		return (r * r) % b


if __name__ == "__main__":
						try:
												__lowercase				   =  int(input('''Enter Base : ''').strip())
												__lowercase				   =  int(input('''Enter Power : ''').strip())
												__lowercase				   =  int(input('''Enter Modulo : ''').strip())
						except ValueError:
												print('''Invalid literal for integer''')

						print(bin_exp_mod(BASE, POWER, MODULO))





'''simple docstring'''




from ..utils import DummyObject, requires_backends






class     a__( metaclass=lowerCAmelCase__     ):


			'''simple docstring'''






			UpperCAmelCase_      :					Optional[int]								=	['''torch''', '''transformers''', '''k_diffusion''']



			def __init__(       self	,   *__lowerCAmelCase	,   **__lowerCAmelCase):




					"""simple docstring"""


					requires_backends(self	,   ["""torch""", """transformers""", """k_diffusion"""])



			@classmethod
			def 							a_	(       cls	,   *__lowerCAmelCase	,   **__lowerCAmelCase):




					"""simple docstring"""


					requires_backends(cls	,   ["""torch""", """transformers""", """k_diffusion"""])







			@classmethod
			def 							a_	(       cls	,   *__lowerCAmelCase	,   **__lowerCAmelCase):




					"""simple docstring"""


					requires_backends(cls	,   ["""torch""", """transformers""", """k_diffusion"""])




