"""simple docstring"""
lowercase__ 	=     {
    'A': ['B', 'C', 'E'],
    'B': ['A', 'D', 'E'],
    'C': ['A', 'F', 'G'],
    'D': ['B'],
    'E': ['A', 'B', 'D'],
    'F': ['C'],
    'G': ['C'],
}







def 						__a       (     _SCREAMING_SNAKE_CASE		,					_SCREAMING_SNAKE_CASE		,					_SCREAMING_SNAKE_CASE       )     ->list[str]:
  a__:					Tuple      							=     set()
  # keep track of all the paths to be checked
  a__:					Optional[int]      							=     [[start]]

  # return path if start is goal
  if start == goal:
    return [start]

  # keeps looping until all possible paths have been checked
  while queue:
    # pop the first path from the queue
    a__:					List[str]      							=     queue.pop(0       )
    # get the last node from the path
    a__:					Optional[int]      							=     path[-1]
    if node not in explored:
      a__:					int      							=     graph[node]
      # go through all neighbour nodes, construct a new path and
      # push it into the queue
      for neighbour in neighbours:
        a__:					Dict      							=     list(_SCREAMING_SNAKE_CASE       )
        new_path.append(_SCREAMING_SNAKE_CASE       )
        queue.append(_SCREAMING_SNAKE_CASE       )
        # return path if neighbour is goal
        if neighbour == goal:
          return new_path

            # mark node as explored
      explored.add(_SCREAMING_SNAKE_CASE       )

    # in case there's no path between the 2 nodes
  return []







def 						__a       (     _SCREAMING_SNAKE_CASE		,					_SCREAMING_SNAKE_CASE		,					_SCREAMING_SNAKE_CASE       )     ->int:
  if not graph or start not in graph or target not in graph:
    return -1
  if start == target:
    return 0
  a__:					str      							=     [start]
  a__:					Tuple      							=     set(_SCREAMING_SNAKE_CASE       )
  # Keep tab on distances from `start` node.
  a__:					str      							=     {start: 0, target: -1}
  while queue:
    a__:					int      							=     queue.pop(0       )
    if node == target:
      a__:					Optional[Any]      							=     (
          dist[node] if dist[target] == -1 else min(dist[target]		,					dist[node]       )
      )
    for adjacent in graph[node]:
      if adjacent not in visited:
        visited.add(_SCREAMING_SNAKE_CASE       )
        queue.append(_SCREAMING_SNAKE_CASE       )
        a__:					Any      							=     dist[node] + 1
  return dist[target]


if __name__ == "__main__":
 print(bfs_shortest_path(demo_graph, 'G', 'D'))  # returns ['G', 'C', 'A', 'B', 'D']
 print(bfs_shortest_path_distance(demo_graph, 'G', 'D'))  # returns 4



"""simple docstring"""
import math







def 						__a       (     _SCREAMING_SNAKE_CASE		,					_SCREAMING_SNAKE_CASE       )     ->Optional[int]:
  if 0 not in (x, y):
    # We use the relation x^y = y*log10(x), where 10 is the base.
    return y * math.logaa(_SCREAMING_SNAKE_CASE       )
  else:
    if x == 0:  # 0 raised to any number is 0
      return 0
    elif y == 0:
      return 1  # any number raised to 0 is 1
  raise AssertionError('This should never happen'       )


if __name__ == "__main__":  # Main function
 # Read two numbers from input and typecast them to int using map function.
 # Here x is the base and y is the power.
 lowercase__ 	=     'Enter the base and the power separated by a comma: '
 lowercase__	, lowercase__ 	=     map(int, input(prompt).split(','))
 lowercase__	, lowercase__ 	=     map(int, input(prompt).split(','))

 # We find the log of each number, using the function res(), which takes two
 # arguments.
 lowercase__ 	=     res(xa, ya)
 lowercase__ 	=     res(xa, ya)

 # We check for the largest number
 if resa > resa:
  print('Largest number is', xa, '^', ya)
 elif resa > resa:
  print('Largest number is', xa, '^', ya)
 else:
  print('Both are equal')


