





class      UpperCamelCase_				:


							def __init__(							self			:str						)      ->      None:



									"""simple docstring"""



									SCREAMING_SNAKE_CASE__								=					[0, 1]


							def    _snake_case     (							self			:Optional[int]							, __A			:int						)      ->      list:



									"""simple docstring"""



									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  SCREAMING_SNAKE_CASE__							(				):
		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=""""""    ,      )
		SCREAMING_SNAKE_CASE__								=					Fibonacci()

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

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

				print(fibonacci.get(UpperCamelCase__			)			)


if __name__ == "__main__":
	main()






from __future__ import annotations

from collections import deque
from queue import Queue
from timeit import timeit

_lowerCamelCase       =	{
    'A': ['B', 'C'],
    'B': ['A', 'D', 'E'],
    'C': ['A', 'F'],
    'D': ['B'],
    'E': ['B', 'F'],
    'F': ['C', 'E'],
}






def  SCREAMING_SNAKE_CASE__							(				UpperCamelCase__:							dict    ,      UpperCamelCase__:							str			):
		SCREAMING_SNAKE_CASE__								=					{start}
		SCREAMING_SNAKE_CASE__								=					[start]
		SCREAMING_SNAKE_CASE__								=					Queue()
		queue.put(UpperCamelCase__			)
		while not queue.empty():
				SCREAMING_SNAKE_CASE__								=					queue.get()
				for w in graph[v]:
						if w not in explored:
								explored.add(UpperCamelCase__			)
								result.append(UpperCamelCase__			)
								queue.put(UpperCamelCase__			)
		return result






def  SCREAMING_SNAKE_CASE__							(				UpperCamelCase__:							dict    ,      UpperCamelCase__:							str			):
		SCREAMING_SNAKE_CASE__								=					{start}
		SCREAMING_SNAKE_CASE__								=					[start]
		SCREAMING_SNAKE_CASE__								=					deque([start]			)
		while queue:
				SCREAMING_SNAKE_CASE__								=					queue.popleft()
				for child in graph[v]:
						if child not in visited:
								visited.add(UpperCamelCase__			)
								result.append(UpperCamelCase__			)
								queue.append(UpperCamelCase__			)
		return result






def  SCREAMING_SNAKE_CASE__							(				UpperCamelCase__:							str			):
		SCREAMING_SNAKE_CASE__								=					f'''from __main__ import G, {name}'''
		SCREAMING_SNAKE_CASE__								=					10_000
		SCREAMING_SNAKE_CASE__								=					timeit(f'''{name}(G, \'A\')'''    ,      setup=UpperCamelCase__    ,      number=UpperCamelCase__			)
		print(f'''{name:<35} finished {number} runs in {res:.5f} seconds'''			)


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	benchmark_function('breadth_first_search')
	benchmark_function('breadth_first_search_with_deque')
	# breadth_first_search                finished 10000 runs in 0.20999 seconds
	# breadth_first_search_with_deque     finished 10000 runs in 0.01421 seconds