
'''simple docstring'''
A__ :		List[Any]					={0: [1, 2], 1: [0, 3], 2: [0], 3: [1], 4: [5, 6], 5: [4, 6], 6: [4, 5]}

A__ :		Tuple					={0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}







def 							A_  (    __SCREAMING_SNAKE_CASE    :	Optional[Any]      ,  __SCREAMING_SNAKE_CASE    :	Dict      ,  __SCREAMING_SNAKE_CASE    :	int			)					->							List[Any]:





  """simple docstring"""

  __A		:  int       				=		True
  __A		:  Optional[Any]       				=		[]

  for neighbour in graph[vert]:
    if not visited[neighbour]:
      connected_verts += dfs(_A      ,  _A      ,  _A			)

  return [vert, *connected_verts]







def 							A_  (    __SCREAMING_SNAKE_CASE    :	List[Any]			)					->							List[Any]:





  """simple docstring"""

  __A		:  str       				=		len(_A			)
  __A		:  int       				=		graph_size * [False]
  __A		:  Optional[int]       				=		[]

  for i in range(_A			):
    if not visited[i]:
      __A		:  List[Any]       				=		dfs(_A      ,  _A      ,  _A			)
      components_list.append(_A			)

  return components_list


if __name__ == "__main__":
     import doctest

     doctest.testmod()











'''simple docstring'''


def 						__magic_name__(			_A       ):
						'''simple docstring'''





						UpperCamelCase__       =			len(_A       )

						# Set the gap value to be decreased by a factor of 1.3
						# after each iteration
						UpperCamelCase__       =			1.3

						# Continue sorting until the gap is 1
						while gap > 1:
												# Decrease the gap value
												UpperCamelCase__       =			int(gap / shrink       )

												# Sort the elements using insertion sort
												for i in range(_A    ,   len(_A       )       ):
																		UpperCamelCase__       =			collection[i]
																		UpperCamelCase__       =			i
																		while j >= gap and collection[j - gap] > temp:
																								UpperCamelCase__       =			collection[j - gap]
																								j -= gap
																		UpperCamelCase__       =			temp

						return collection


if __name__ == "__main__":
					import doctest

					doctest.testmod()
