D. Dom's Discovery
time limit per test
1 second
memory limit per test
64 megabytes
input
standard input
output
standard output

There are $$$n$$$ freshman students in NTUIM and they are labeled from $$$1$$$ to $$$n$$$. Dom, a freshman student in NTUIM, is also an observer. He is enthusiastic about discovering the interpersonal relationship in his class. Therefore, he tried to draw a sociogram to present his discovery.

The sociogram is a directed graph as follows. The graph is guaranteed to be connected. There are $$$m$$$ directed edges in the graph. There is an edge from $$$A$$$ to $$$B$$$ (i.e. $$$A$$$ can reach $$$B$$$), if $$$A$$$ considers $$$B$$$ as his good friend. $$$A$$$ and $$$B$$$ will be in the same group if and only if $$$A$$$ can reach $$$B$$$ and $$$B$$$ can reach $$$A$$$ directly or indirectly, too.

For example, in the following graph, $$$1$$$, $$$2$$$, $$$3$$$, $$$8$$$ are in the same group; $$$4$$$, $$$5$$$, $$$6$$$ are in the same group; $$$7$$$ is a group; $$$9$$$ is a group.

To help Dom discover more, please calculate how many groups are there in the class. In addition, please find out all the members in one of the biggest groups.

Input
Input

The first line contains two integers $$$n$$$ ($$$1 \le n \le 10^5$$$) and $$$m$$$ ($$$n-1 \le m \le \min\left(2 \times 10^5, n(n-1)\right)$$$), denoting the number of classmates in Dom's class and the number of the directed edges, respectively.

The following $$$m$$$ lines describe the edges. The $$$i$$$-th line ($$$1 \le i \le m$$$) contains two integers $$$a_i$$$ and $$$b_i$$$ ($$$1 \le a_i, b_i \le n, a_i \ne b_i$$$), denoting that there is an directed edge from $$$a_i$$$ to $$$b_i$$$ (but not necessarily from $$$b_i$$$ to $$$a_i$$$). It is guaranteed that all edges ($$$a_i$$$, $$$b_i$$$) are distinct.

Output

Print the number of groups in Dom's class in the first line. Note that a single person can also form a group. For the second line, print all the classmates' ID in the biggest group. If there are several groups which has the same size as the biggest group, print any of them.

Example
Input
9 13
1 2
2 3
3 4
4 5
5 6
6 4
3 1
1 8
8 3
8 9
9 7
3 7
7 5
Output
4
1 3 2 8