





from __future__ import annotations

lowerCAmelCase							:       List[Any]					 =	{
    'A': ['B', 'C', 'E'],
    'B': ['A', 'D', 'E'],
    'C': ['A', 'F', 'G'],
    'D': ['B'],
    'E': ['A', 'B', 'D'],
    'F': ['C'],
    'G': ['C'],
}





class 				a			:






				def __init__(  self			, _lowerCAmelCase			, _lowerCAmelCase					):

										"""simple docstring"""




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






				def 			snake_case_    (  self					):

										"""simple docstring"""




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

										while queue:
																__SCREAMING_SNAKE_CASE:				Tuple           =   queue.pop(0					)
																for adjacent_vertex in self.graph[vertex]:
																						if adjacent_vertex not in visited:
																												visited.add(__lowercase					)
																												__SCREAMING_SNAKE_CASE:				Dict           =   vertex
																												queue.append(__lowercase					)






				def 			snake_case_    (  self			, _lowerCAmelCase					):

										"""simple docstring"""




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

										__SCREAMING_SNAKE_CASE:				Tuple           =   self.parent.get(__lowercase					)
										if target_vertex_parent is None:
																__SCREAMING_SNAKE_CASE:				Tuple           =   (
																    f"""No path from vertex: {self.source_vertex} to vertex: {target_vertex}"""
																)
																raise ValueError(__lowercase					)

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


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







'''simple docstring'''
from math import ceil


def       _lowercase							(					UpperCamelCase__							:       int = 1001      ):
 __A	:		int	  =      1

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

 return total


if __name__ == "__main__":
 import sys

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






