


from __future__ import annotations

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

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






def 						_A						(						_lowercase			,       _lowercase				)			->				List[str]:


     """simple docstring"""


     __UpperCamelCase				=	{start}
     __UpperCamelCase				=	[start]
     __UpperCamelCase				=	Queue()
     queue.put(lowercase__				)
     while not queue.empty():
          __UpperCamelCase				=	queue.get()
          for w in graph[v]:
               if w not in explored:
                    explored.add(lowercase__				)
                    result.append(lowercase__				)
                    queue.put(lowercase__				)
     return result






def 						_A						(						_lowercase			,       _lowercase				)			->				Optional[int]:


     """simple docstring"""


     __UpperCamelCase				=	{start}
     __UpperCamelCase				=	[start]
     __UpperCamelCase				=	deque([start]				)
     while queue:
          __UpperCamelCase				=	queue.popleft()
          for child in graph[v]:
               if child not in visited:
                    visited.add(lowercase__				)
                    result.append(lowercase__				)
                    queue.append(lowercase__				)
     return result






def 						_A						(						_lowercase				)			->				Optional[Any]:


     """simple docstring"""


     __UpperCamelCase				=	f'''from __main__ import G, {name}'''
     __UpperCamelCase				=	1_00_00
     __UpperCamelCase				=	timeit(f'''{name}(G, \'A\')'''			,       setup=lowercase__			,       number=lowercase__				)
     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






import math






def 						_A						(						_lowercase				)			->				bool:


     """simple docstring"""


     if 1 < number < 4:
          # 2 and 3 are primes
          return True
     elif number < 2 or number % 2 == 0 or number % 3 == 0:
          # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
          return False

     # All primes number are in format of 6k +/- 1
     for i in range(5			,       int(math.sqrt(_lowercase				) + 1				)			,       6				):
          if number % i == 0 or number % (i + 2) == 0:
               return False
     return True






def 						_A						(						_lowercase = 2_00_00_00				)			->				int:


     """simple docstring"""


     return sum(num for num in range(3			,       _lowercase			,       2				) if is_prime(_lowercase				)				) + 2 if n > 2 else 0


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


