




"""simple docstring"""







class 					SCREAMING_SNAKE_CASE__    :


						def __init__(							self :	List[str]    ):
										lowerCAmelCase              = {}


						def      __lowercase       (							self :	Optional[int]    ):
										print(self.vertex    )
										for i in self.vertex:
														print(lowercase_  ,  """ -> """  ,  """ -> """.join([str(lowercase_    ) for j in self.vertex[i]]    )    )


						def      __lowercase       (							self :	Any  ,  lowerCAmelCase :	int  ,  lowerCAmelCase :	int    ):
										# check if vertex is already present,
										if from_vertex in self.vertex:
														self.vertex[from_vertex].append(lowercase_    )
										else:
														# else make a new vertex
														lowerCAmelCase              = [to_vertex]


						def      __lowercase       (							self :	Tuple    ):
										# visited array for storing already visited nodes
										lowerCAmelCase              = [False] * len(self.vertex    )

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




						def      __lowercase       (							self :	List[str]  ,  lowerCAmelCase :	int  ,  lowerCAmelCase :	list    ):
										# mark start vertex as visited
										lowerCAmelCase              = True

										print(lowercase_  ,  end=""" """    )

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


if __name__ == "__main__":
		a            =							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'''

from ..utils import DummyObject, requires_backends






class    UpperCAmelCase	(       metaclass=UpperCamelCase__				):
 __lowercase   		=				["""note_seq"""]
 def __init__(				self      :Optional[Any]						,       *lowercase_      :List[Any]						,       **lowercase_      :List[str]							)->							int:
     requires_backends(self						,       ["note_seq"]							)
 @classmethod
 def      UpperCAmelCase_							(				cls      :str						,       *lowercase_      :Union[str, Any]						,       **lowercase_      :Any							)->							Optional[int]:
     requires_backends(cls						,       ["note_seq"]							)



 @classmethod
 def      UpperCAmelCase_							(				cls      :Dict						,       *lowercase_      :Tuple						,       **lowercase_      :List[Any]							)->							Optional[Any]:
     requires_backends(cls						,       ["note_seq"]							)



