from __future__ import annotations

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

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



def    lowerCamelCase_   (  _lowercase ,     _lowercase    )							->	List[str]:
  __A							:   Any	  =				{start}
  __A							:   int	  =				[start]
  __A							:   Any	  =				Queue()
  queue.put(__UpperCamelCase    )
  while not queue.empty():
    __A							:   str	  =				queue.get()
    for w in graph[v]:
      if w not in explored:
        explored.add(__UpperCamelCase    )
        result.append(__UpperCamelCase    )
        queue.put(__UpperCamelCase    )
  return result



def    lowerCamelCase_   (  _lowercase ,     _lowercase    )							->	List[Any]:
  __A							:   Union[str, Any]	  =				{start}
  __A							:   Tuple	  =				[start]
  __A							:   List[Any]	  =				deque([start]    )
  while queue:
    __A							:   Optional[Any]	  =				queue.popleft()
    for child in graph[v]:
      if child not in visited:
        visited.add(__UpperCamelCase    )
        result.append(__UpperCamelCase    )
        queue.append(__UpperCamelCase    )
  return result



def    lowerCamelCase_   (  _lowercase    )							->	Optional[int]:
  __A							:   Optional[Any]	  =				F"from __main__ import G, {name}"
  __A							:   int	  =				10_000
  __A							:   Optional[Any]	  =				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






import os



def    lowerCamelCase_   (  )							->	List[str]:
		__A							:   Any	  =				0
		__A							:   Any	  =				0
		with open(os.path.dirname(_lowercase    ) + "/p022_names.txt"    ) as file:
				__A							:   int	  =				str(file.readlines()[0]    )
				__A							:   Optional[Any]	  =				name.replace("\"" ,     ""    ).split(","    )

		name.sort()
		for i in range(len(_lowercase    )    ):
				for j in name[i]:
						temp_sum += ord(_lowercase    ) - ord("A"    ) + 1
				total_sum += (i + 1) * temp_sum
				__A							:   List[Any]	  =				0
		return total_sum


if __name__ == "__main__":
					print(solution())





