

from __future__ import annotations

UpperCAmelCase__ :     List[str]				    =    {
    """A""": ["""B""", """C""", """E"""],
    """B""": ["""A""", """D""", """E"""],
    """C""": ["""A""", """F""", """G"""],
    """D""": ["""B"""],
    """E""": ["""A""", """B""", """D"""],
    """F""": ["""C"""],
    """G""": ["""C"""],
}







class        a__       :







  """simple docstring"""




  def __init__(			self    : Optional[Any]				,				UpperCAmelCase__    : dict[str, list[str]]				,				UpperCAmelCase__    : str		)					->None:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      List[Any]       =   graph
        # mapping node to its parent in resulting breadth first tree
        SCREAMING_SNAKE_CASE :      dict[str, str | None]       =   {}
        SCREAMING_SNAKE_CASE :      Any       =   source_vertex


  def  _lowercase      (			self    : Dict		)					->None:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      str       =   {self.source_vertex}
        SCREAMING_SNAKE_CASE :      Optional[int]       =   None
        SCREAMING_SNAKE_CASE :      Any       =   [self.source_vertex]  # first in first out queue

        while queue:
              SCREAMING_SNAKE_CASE :      Optional[Any]       =   queue.pop(0		)
              for adjacent_vertex in self.graph[vertex]:
                    if adjacent_vertex not in visited:
                          visited.add(UpperCAmelCase__		)
                          SCREAMING_SNAKE_CASE :      Optional[Any]       =   vertex
                          queue.append(UpperCAmelCase__		)




  def  _lowercase      (			self    : Optional[int]				,				UpperCAmelCase__    : str		)					->str:
        """simple docstring"""







        if target_vertex == self.source_vertex:
              return self.source_vertex

        SCREAMING_SNAKE_CASE :      Any       =   self.parent.get(UpperCAmelCase__		)
        if target_vertex_parent is None:
              SCREAMING_SNAKE_CASE :      Optional[Any]       =   (
                  f"No path from vertex: {self.source_vertex} to vertex: {target_vertex}"
              )
              raise ValueError(UpperCAmelCase__		)

        return self.shortest_path(UpperCAmelCase__		) + f"->{target_vertex}"


if __name__ == "__main__":
  UpperCAmelCase__ :     Tuple				    =    Graph(graph, """G""")
  g.breath_first_search()
  print(g.shortest_path("""D"""))
  print(g.shortest_path("""G"""))
  print(g.shortest_path("""Foo"""))







from math import ceil






def 					__lowercase      (     _A = 1001			)     ->						int:
      SCREAMING_SNAKE_CASE :      Union[str, Any]       =   1

      for i in range(1						,    int(ceil(n / 2.0			)			)			):
            SCREAMING_SNAKE_CASE :      Dict       =   2 * i + 1
            SCREAMING_SNAKE_CASE :      Optional[int]       =   2 * i
            SCREAMING_SNAKE_CASE :      str       =   total + 4 * odd**2 - 6 * even

      return total


if __name__ == "__main__":
  import sys

  if len(sys.argv) == 1:
    print(solution())
  else:
    try:
      UpperCAmelCase__ :     str				    =    int(sys.argv[1])
      print(solution(n))
    except ValueError:
      print("""Invalid entry - please enter a number""")




