



"""simple docstring"""






class 	__snake_case	:




  def __init__(			self					:						List[Any]		):






         """simple docstring"""






         _lowerCamelCase						:    Tuple         =			{}




  def 						SCREAMING_SNAKE_CASE    (			self					:						Optional[int]		):






         """simple docstring"""






         print(self.vertex		)
         for i in self.vertex:
                print(__a						, ''' -> '''						, ''' -> '''.join([str(__a		) for j in self.vertex[i]]		)		)




  def 						SCREAMING_SNAKE_CASE    (			self					:						Tuple						, __lowerCAmelCase					:						int						, __lowerCAmelCase					:						int		):






         """simple docstring"""






         if from_vertex in self.vertex:
                self.vertex[from_vertex].append(__a		)
         else:
                # else make a new vertex
                _lowerCamelCase						:    str         =			[to_vertex]




  def 						SCREAMING_SNAKE_CASE    (			self					:						List[str]		):






         """simple docstring"""






         _lowerCamelCase						:    Dict         =			[False] * len(self.vertex		)

         # call the recursive helper function
         for i in range(len(self.vertex		)		):
                if not visited[i]:
                       self.dfs_recursive(__a						, __a		)




  def 						SCREAMING_SNAKE_CASE    (			self					:						str						, __lowerCAmelCase					:						int						, __lowerCAmelCase					:						list		):






         """simple docstring"""






         _lowerCamelCase						:    Optional[Any]         =			True

         print(__a						, end=''' '''		)

         # Recur for all the vertices that are adjacent to this node
         for i in self.vertex:
                if not visited[i]:
                       self.dfs_recursive(__a						, __a		)


if __name__ == "__main__":
  lowerCAmelCase__      =    Graph()
  g.add_edge(0, 1)
  g.add_edge(0, 2)
  g.add_edge(1, 2)
  g.add_edge(2, 0)
  g.add_edge(2, 3)
  g.add_edge(3, 3)

  g.print_graph()
  print('''DFS:''')
  g.dfs()

  # OUTPUT:
  # 0  ->  1 -> 2
  # 1  ->  2
  # 2  ->  0 -> 3
  # 3  ->  3
  # DFS:
  #  0 1 2 3







"""simple docstring"""






def 	snake_case_  (				A_ :		float						):


       '''simple docstring'''





       if edge <= 0 or not isinstance(A_,    A_						):
              raise ValueError('''Length must be a positive.'''						)
       return 3 * ((25 + 10 * (5 ** (1 / 2))) ** (1 / 2)) * (edge**2)






def 	snake_case_  (				A_ :		float						):


       '''simple docstring'''





       if edge <= 0 or not isinstance(A_,    A_						):
              raise ValueError('''Length must be a positive.'''						)
       return ((15 + (7 * (5 ** (1 / 2)))) / 4) * (edge**3)


if __name__ == "__main__":
   import doctest

   doctest.testmod()


