




class     snake_case__							:
				"""simple docstring"""



				def __init__(      self				:     Union[str, Any]							)					->     List[Any]:
							a    =			{}





				def 							__UpperCAmelCase							(      self				:     Optional[Any]							)					->     None:
							print(self.vertex							)
							for i in self.vertex:
										print(__lowerCamelCase					,      " -> "					,      " -> ".join([str(__lowerCamelCase							) for j in self.vertex[i]]							)							)





				def 							__UpperCAmelCase							(      self				:     int					,      __lowerCamelCase				:     int					,      __lowerCamelCase				:     int							)					->     None:
							# check if vertex is already present,
							if from_vertex in self.vertex:
										self.vertex[from_vertex].append(__lowerCamelCase							)
							else:
										# else make a new vertex
										a    =			[to_vertex]





				def 							__UpperCAmelCase							(      self				:     int							)					->     None:
							# visited array for storing already visited nodes
							a    =			[False] * len(self.vertex							)

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





				def 							__UpperCAmelCase							(      self				:     int					,      __lowerCamelCase				:     int					,      __lowerCamelCase				:     list							)					->     None:
							# mark start vertex as visited
							a    =			True

							print(__lowerCamelCase					,      end=" "							)

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


if __name__ == "__main__":
		__lowerCAmelCase		:				str       			=		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














lowerCamelCase	:							List[Any]				=[
    (1000, '''M'''),
    (900, '''CM'''),
    (500, '''D'''),
    (400, '''CD'''),
    (100, '''C'''),
    (90, '''XC'''),
    (50, '''L'''),
    (40, '''XL'''),
    (10, '''X'''),
    (9, '''IX'''),
    (5, '''V'''),
    (4, '''IV'''),
    (1, '''I'''),
]







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase			) ->	int:
     UpperCamelCase__			:   Optional[int]       				=  {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000}
     UpperCamelCase__			:   Any       				=  0
     UpperCamelCase__			:   Any       				=  0
     while place < len(__lowerCAmelCase			):
          if (place + 1 < len(__lowerCAmelCase			)) and (vals[roman[place]] < vals[roman[place + 1]]):
               total += vals[roman[place + 1]] - vals[roman[place]]
               place += 2
          else:
               total += vals[roman[place]]
               place += 1
     return total







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase			) ->	str:
     UpperCamelCase__			:   Optional[int]       				=  []
     for arabic, roman in ROMAN:
          ((UpperCamelCase__)				,     (UpperCamelCase__))			:   Optional[int]       				=  divmod(__lowerCAmelCase					,    __lowerCAmelCase			)
          result.append(roman * factor			)
          if number == 0:
               break
     return "".join(__lowerCAmelCase			)


if __name__ == "__main__":
 import doctest

 doctest.testmod()