Find the number of connected components in the graph given by adjacency list.
The first line contains the number of vertices . Then lines are given. The -th line contains the description of all edges, outgoing from the -th vertex. Description starts with the number of outgoing edges. Then given the vertex numbers where the edges go. All vertices are numbered from to .
Print the number of connected components.