Please use python:
# Problem Description
Given a directed graph G = (V, E), find the number of
connected components in G.
# Input
The graph has `n` vertices and `m` edges.
There are m + 1 lines, the first line gives two numbers `n`
and `m`, describing the number of vertices and edges. Each of the
following lines contains two numbers `a` and `b` meaning there is
an edge (a,b) belong to E. All the numbers in a line...