Dyeing In each dyeing round, Xiaoxiang can dye any number of points.
Two positive integersin the first row represent the number of points and edges of this directed graph. Where the number of the point is
.
Nextlines, each line has two positive integers
, indicating that there is a directed edge connecting from
to
.
It contains only one line and a positive integer, which indicates the minimum number of rounds needed to dye this directed graph.