



"""simple docstring"""






class     A__     :




	'''simple docstring'''





	def __init__(  self:	List[str])       -> Optional[Any]:

				"""simple docstring"""

				__lowerCAmelCase   :						Tuple				= {}

	def 							_SCREAMING_SNAKE_CASE     (  self:	Optional[int])       -> 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:	Any ,    _SCREAMING_SNAKE_CASE:	Any ,    _SCREAMING_SNAKE_CASE:	Tuple)       -> int:

				"""simple docstring"""

				if from_vertex in self.vertex:
							self.vertex[from_vertex].append(a_)
				else:
							# else make a new vertex
							__lowerCAmelCase   :						Any				= [to_vertex]

	def 							_SCREAMING_SNAKE_CASE     (  self:	int)       -> List[Any]:

				"""simple docstring"""

				__lowerCAmelCase   :						Optional[Any]				= [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:	Dict ,    _SCREAMING_SNAKE_CASE:	List[str] ,    _SCREAMING_SNAKE_CASE:	Dict)       -> int:

				"""simple docstring"""

				__lowerCAmelCase   :						Dict				= 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__":
					__snake_case							:     Any   =					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 abc import ABC, abstractmethod
from argparse import ArgumentParser



class     A__     (						__SCREAMING_SNAKE_CASE							):




	'''simple docstring'''





	@staticmethod
	@abstractmethod
	def 							_SCREAMING_SNAKE_CASE     (  _SCREAMING_SNAKE_CASE:	ArgumentParser)       -> str:

				"""simple docstring"""

				raise NotImplementedError()







	@abstractmethod
	def 							_SCREAMING_SNAKE_CASE     (  self:	List[str])       -> str:

				"""simple docstring"""

				raise NotImplementedError()