'''simple docstring'''




class 					__magic_name__		:







			def __init__(			self       :						List[str]					):
										lowercase_      :    Optional[Any]       		= {}







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







			def 			SCREAMING_SNAKE_CASE_  (			self       :						Optional[int]       ,    lowercase_       :						int       ,    lowercase_       :						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
																	lowercase_      :    Union[str, Any]       		= [to_vertex]







			def 			SCREAMING_SNAKE_CASE_  (			self       :						Any					):
										# visited array for storing already visited nodes
										lowercase_      :    str       		= [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 			SCREAMING_SNAKE_CASE_  (			self       :						List[str]       ,    lowercase_       :						int       ,    lowercase_       :						list					):
										# mark start vertex as visited
										lowercase_      :    Dict       		= 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__":
						_lowercase		:				Optional[int]	       =		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 __future__ import annotations




def 							lowerCamelCase			(   UpperCAmelCase__ :      list   ,   UpperCAmelCase__ :      int | None = None   ,   UpperCAmelCase__ :      int | None = None				)    ->   None:
							if start is None:
														lowercase_      :    Any       		= 0

							if end is None:
														lowercase_      :    List[Any]       		= len(UpperCAmelCase__				) - 1

							if start >= end:
														return

							lowercase_      :    Optional[int]       		= (start + end) // 2

							slowsort(UpperCAmelCase__   ,   UpperCAmelCase__   ,   UpperCAmelCase__				)
							slowsort(UpperCAmelCase__   ,   mid + 1   ,   UpperCAmelCase__				)

							if sequence[end] < sequence[mid]:
														lowercase_		,		lowercase_      :    Dict       		= sequence[mid], sequence[end]

							slowsort(UpperCAmelCase__   ,   UpperCAmelCase__   ,   end - 1				)


if __name__ == "__main__":
						from doctest import testmod

						testmod()





