




def 							__SCREAMING_SNAKE_CASE  (      snake_case_     ,   snake_case_     ,   snake_case_						):

      '''simple docstring'''


      assert b != 0, "This cannot accept modulo that is == 0"
      if n == 0:
            return 1

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

      _UpperCAmelCase													=					bin_exp_mod(snake_case_     ,   n / 2     ,   snake_case_						)
      return (r * r) % b


if __name__ == "__main__":
    try:
        lowercase_     :    int      =			int(input('Enter Base : ').strip())
        lowercase_     :    str      =			int(input('Enter Power : ').strip())
        lowercase_     :    Optional[Any]      =			int(input('Enter Modulo : ').strip())
    except ValueError:
        print('Invalid literal for integer')

    print(bin_exp_mod(BASE, POWER, MODULO))










from __future__ import annotations


def 							__SCREAMING_SNAKE_CASE  (      snake_case_						):

						'''simple docstring'''


						if len(snake_case_						) == 0:
												raise ValueError("find_max() arg is an empty sequence"						)
						_UpperCAmelCase													=					nums[0]
						for x in nums:
												if x > max_num:
																		_UpperCAmelCase													=					x
						return max_num


if __name__ == "__main__":
				import doctest

				doctest.testmod(verbose=True)




