Mother Vertex
easy
Given a Directed Graph, find a Mother Vertex in the Graph (if present). A Mother Vertex is a vertex through which we can reach all the other vertices of the Graph.
Constraints
1<= N <= 10000 1<= M <= (N*(N-1))/2 1<= ai, bi <= N
Format
Input
First line contains two space separated integers,N and M. Then M lines follow, each line has 2 space separated integers ai and bi.
Output
Print the mother vertex if present else print -1.
Example
Sample Input
4 3
1 2
2 3
3 4
Sample Output
1