


"""simple docstring"""







from __future__ import annotations

import sys


def 	lowercase     (							A_    ,  A_			)-> tuple[int, int]:
  '''simple docstring'''







  if abs(_lowercase			) == 1:
    return a, 0
  elif abs(_lowercase			) == 1:
    return 0, b

  a		:						Optional[Any] 				=     a, b
  a		:						Optional[Any] 				=     1, 0
  a		:						int 				=     0, 1

  while remainder != 0:
    a		:						Optional[int] 				=     old_remainder // remainder
    a		:						Optional[int] 				=     remainder, old_remainder - quotient * remainder
    a		:						Optional[int] 				=     coeff_a, old_coeff_a - quotient * coeff_a
    a		:						List[str] 				=     coeff_b, old_coeff_b - quotient * coeff_b

  # sign correction for negative numbers
  if a < 0:
    a		:						Tuple 				=     -old_coeff_a
  if b < 0:
    a		:						Any 				=     -old_coeff_b

  return old_coeff_a, old_coeff_b


def 	lowercase     (							)-> List[Any]:
  '''simple docstring'''







  if len(sys.argv			) < 3:
    print("2 integer arguments required"			)
    return 1
  a		:						Any 				=     int(sys.argv[1]			)
  a		:						List[Any] 				=     int(sys.argv[2]			)
  print(extended_euclidean_algorithm(_lowercase    ,  _lowercase			)			)
  return 0


if __name__ == "__main__":
 raise SystemExit(main())











'''simple docstring'''




class      UpperCamelCase_					:





	def __init__(    self       )     ->     None:
								UpperCAmelCase	:						int					=						[0, 1]






	def 					_lowercase(    self						,						A       )     ->     list:
								if (difference := index - (len(self.sequence       ) - 2)) >= 1:
															for _ in range(A       ):
																						self.sequence.append(self.sequence[-1] + self.sequence[-2]       )
								return self.sequence[:index]




def  __lowerCamelCase    (   ) ->     None:
							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	:						Tuple					=						Fibonacci()

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

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

														print(fibonacci.get(_lowercase						)						)


if __name__ == "__main__":
							main()

