from __future__ import annotations

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

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





def      __lowercase  (		lowerCamelCase      :  dict						,						lowerCamelCase      :  str			):
 UpperCamelCase_      :		Tuple				=      {start}
 UpperCamelCase_      :		Optional[Any]				=      [start]
 UpperCamelCase_      :		Queue				=      Queue()
 queue.put(lowerCamelCase			)
 while not queue.empty():
  UpperCamelCase_      :		Union[str, Any]				=      queue.get()
  for w in graph[v]:
   if w not in explored:
    explored.add(lowerCamelCase			)
    result.append(lowerCamelCase			)
    queue.put(lowerCamelCase			)
 return result





def      __lowercase  (		lowerCamelCase      :  dict						,						lowerCamelCase      :  str			):
 UpperCamelCase_      :		Dict				=      {start}
 UpperCamelCase_      :		Optional[int]				=      [start]
 UpperCamelCase_      :		Union[str, Any]				=      deque([start]			)
 while queue:
  UpperCamelCase_      :		Optional[int]				=      queue.popleft()
  for child in graph[v]:
   if child not in visited:
    visited.add(lowerCamelCase			)
    result.append(lowerCamelCase			)
    queue.append(lowerCamelCase			)
 return result





def      __lowercase  (		lowerCamelCase      :  str			):
 UpperCamelCase_      :		str				=      F"from __main__ import G, {name}"
 UpperCamelCase_      :		int				=      10000
 UpperCamelCase_      :		Optional[Any]				=      timeit(F"{name}(G, 'A')"						,						setup=lowerCamelCase						,						number=lowerCamelCase			)
 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




def      __lowercase  (		lowerCamelCase      :  int = 998001			):
 UpperCamelCase_      :		int				=      0
 for i in range(999						,						99						,						-1			):  # 3 digit numbers range from 999 down to 100
  for j in range(999						,						99						,						-1			):
   UpperCamelCase_      :		str				=      str(i * j			)
   if product_string == product_string[::-1] and i * j < n:
    UpperCamelCase_      :		str				=      max(lowerCamelCase						,						i * j			)
 return answer


if __name__ == "__main__":
   print(F"""{solution() = }""")



