


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

lowerCAmelCase__						=			{0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}
def 							_UpperCAmelCase    (UpperCamelCase__					:  dict    ,							UpperCamelCase__					:  int    ,							UpperCamelCase__					:  list						):
       _A				:	str       =			True
       _A				:	Any       =			[]

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

       return [vert, *connected_verts]
def 							_UpperCAmelCase    (UpperCamelCase__					:  dict						):
       _A				:	Any       =			len(UpperCamelCase__						)
       _A				:	str       =			graph_size * [False]
       _A				:	str       =			[]

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

       return components_list


if __name__ == "__main__":
    import doctest

    doctest.testmod()




from itertools import permutations
def 							_UpperCAmelCase    ():
       _A				:	List[Any]       =			list(map("".join    ,							permutations("0123456789"						)						)						)
       return result[999999]


if __name__ == "__main__":
    print(solution())
