
"""simple docstring"""

def 				A		(							snake_case :int							,   snake_case :int							,   snake_case :int						) ->      Dict:



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

 while power > 0:
  if power & 1:
   __UpperCamelCase							    =			(result * base) % mod
  __UpperCamelCase							    =			power >> 1
  __UpperCamelCase							    =			(base * base) % mod

 return result






def 				A		(							) ->      Tuple:
 print(modular_exponential(3							,   2_0_0							,   1_3						)						)


if __name__ == "__main__":
      import doctest

      doctest.testmod()

      main()











class        _SCREAMING_SNAKE_CASE			:





	def __init__(						self							:   Union[str, Any]      ):
		UpperCamelCase	:Union[str, Any]		=      [0, 1]





	def 		_A					(						self							:   str					,    __lowerCamelCase							:   int      ):
		if (difference := index - (len(self.sequence      ) - 2)) >= 1:
			for _ in range(__lowerCamelCase      ):
				self.sequence.append(self.sequence[-1] + self.sequence[-2]      )
		return self.sequence[:index]

def   SCREAMING_SNAKE_CASE_				(				)						->     None:






	"""simple docstring"""



	print(
	    """Fibonacci Series Using Dynamic Programming\n"""      ,     """Enter the index of the Fibonacci number you want to calculate """      ,     """in the prompt below. (To exit enter exit or Ctrl-C)\n"""      ,     sep=""""""      ,     )
	UpperCamelCase	:Any		=      Fibonacci()

	while True:
		UpperCamelCase	:str		=      input(""">> """   )
		if prompt in {"exit", "quit"}:
			break

		try:
			UpperCamelCase	:int		=      int(__magic_name__   )
		except ValueError:
			print("""Enter a number or 'exit'"""   )
			continue

		print(fibonacci.get(__magic_name__   )   )


if __name__ == "__main__":
	main()
