def  __lowerCamelCase						(		lowerCAmelCase__      ,    lowerCAmelCase__      ,    lowerCAmelCase__      ):
       assert b != 0, "This cannot accept modulo that is == 0"
       if n == 0:
              return 1

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

       lowerCAmelCase__	      =   bin_exp_mod(lowercase__      ,    n / 2      ,    lowercase__      )
       return (r * r) % b


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

    print(bin_exp_mod(BASE, POWER, MODULO))





from .prime_check import Test

Test()

