


from __future__ import annotations


def 				lowerCamelCase__	(      a	:   Union[str, Any]	,  a	:   Dict				)    ->	bool:





			"""simple docstring"""
			if len(lowerCamelCase__				) == 0:
						return False
			a__ :str						  =    len(lowerCamelCase__				) // 2
			if a_list[midpoint] == item:
						return True
			if item < a_list[midpoint]:
						return binary_search(a_list[:midpoint]	,  lowerCamelCase__				)
			else:
						return binary_search(a_list[midpoint + 1 :]	,  lowerCamelCase__				)


if __name__ == "__main__":
			snake_case__			 =						input('''Enter numbers separated by comma:\n''').strip()
			snake_case__			 =						[int(item.strip()) for item in user_input.split(''',''')]
			snake_case__			 =						int(input('''Enter the number to be found in the list:\n''').strip())
			snake_case__			 =						'''''' if binary_search(sequence, target) else '''not '''
			print(f'''{target} was {not_str}found in {sequence}''')






class 					lowerCAmelCase_ :




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






									"""simple docstring"""






									a__ :Tuple						  =    {}




						def  _snake_case					(	self						:   Tuple						)      ->None:






									"""simple docstring"""






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




						def  _snake_case					(	self						:   Optional[int]   ,     __A						:   int   ,     __A						:   int						)      ->None:






									"""simple docstring"""






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




						def  _snake_case					(	self						:   Optional[int]						)      ->None:






									"""simple docstring"""






									a__ :List[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  _snake_case					(	self						:   Union[str, Any]   ,     __A						:   int   ,     __A						:   list						)      ->None:






									"""simple docstring"""






									a__ :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__			 =						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


