



A_		:  int										=  {0: [1, 2], 1: [0, 3], 2: [0], 3: [1], 4: [5, 6], 5: [4, 6], 6: [4, 5]}

A_		:  List[Any]										=  {0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}


def 						UpperCAmelCase__   (   UpperCAmelCase__			:Dict			,       UpperCAmelCase__			:Any			,       UpperCAmelCase__			:Union[str, Any]       ):






 '''simple docstring'''

 a							=		True
 a							=		[]

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

 return [vert, *connected_verts]


def 						UpperCAmelCase__   (   UpperCAmelCase__			:str       ):






 '''simple docstring'''

 a							=		len(UpperCAmelCase__       )
 a							=		graph_size * [False]
 a							=		[]

 for i in range(UpperCAmelCase__       ):
  if not visited[i]:
   a							=		dfs(UpperCAmelCase__			,       UpperCAmelCase__			,       UpperCAmelCase__       )
   components_list.append(UpperCAmelCase__       )

 return components_list


if __name__ == "__main__":
     import doctest

     doctest.testmod()





'''simple docstring'''
from __future__ import annotations







class 					_A						:



   '''simple docstring'''






   def __init__(	self	:					Any					, lowerCamelCase	:					int						)->	None:
          snake_case__					:	Optional[int]          =					value
          snake_case__					:	Node | None          =					None
          snake_case__					:	Node | None          =					None







class 					_A						:



   '''simple docstring'''






   _lowercase    						= 42




   def __init__(	self	:					str						)->	None:
          snake_case__					:	int          =					0




   def   __lowerCAmelCase						(	self	:					Tuple					, lowerCamelCase	:					Node | None					, lowerCamelCase	:					int						)->	None:
          if node is None:
                 return

          if path_sum == self.target:
                 self.paths += 1

          if node.left:
                 self.depth_first_search(node.left					, path_sum + node.left.value						)
          if node.right:
                 self.depth_first_search(node.right					, path_sum + node.right.value						)




   def   __lowerCAmelCase						(	self	:					Tuple					, lowerCamelCase	:					Node | None					, lowerCamelCase	:					int | None = None						)->	int:
          if node is None:
                 return 0
          if target is not None:
                 snake_case__					:	Dict          =					target

          self.depth_first_search(lowerCamelCase					, node.value						)
          self.path_sum(node.left						)
          self.path_sum(node.right						)

          return self.paths


if __name__ == "__main__":
     import doctest

     doctest.testmod()




