Suppose there are `N` people in ZJU, whose ages are unknown. We have some messages about them. The `i`-th message shows that the age of person `s _{i}` is not smaller than the age of person

There are multiple test cases. For each test case:
The first line contains two integers `N`(1≤ `N`≤ 100000), `M`(1≤ `M`≤ 300000), `N` is the number of people, and `M` is is the number of messages.
Then followed by `M` lines, each line contain two integers s_{i} and t_{i}.
There is a blank line between every two cases.
Process to the end of input.

提交代码