




__magic_name__     :     str  							=					{0: [1, 2], 1: [0, 3], 2: [0], 3: [1], 4: [5, 6], 5: [4, 6], 6: [4, 5]}

__magic_name__     :     Optional[Any]  							=					{0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}
def 		a_       (   __lowerCAmelCase      ,   __lowerCAmelCase      ,   __lowerCAmelCase							):
  lowerCAmelCase__								=			True
  lowerCAmelCase__								=			[]

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

  return [vert, *connected_verts]
def 		a_       (   __lowerCAmelCase							):
  lowerCAmelCase__								=			len(lowercase_							)
  lowerCAmelCase__								=			graph_size * [False]
  lowerCAmelCase__								=			[]

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

  return components_list


if __name__ == "__main__":
      import doctest

      doctest.testmod()







def 		a_       (   __lowerCAmelCase      ,   __lowerCAmelCase							):
  lowerCAmelCase__								=			0
  for ele in arr:
    total_sum += product_sum(__lowerCAmelCase      ,   depth + 1							) if isinstance(__lowerCAmelCase      ,   __lowerCAmelCase							) else ele
  return total_sum * depth
def 		a_       (   __lowerCAmelCase							):
  return product_sum(__lowerCAmelCase      ,   1							)


if __name__ == "__main__":
      import doctest

      doctest.testmod()

