The smallest Topological Sort#10651

The smallest Topological Sort

1 second
128 megabytes
Medium

Given a directed unweighted graph. Find its lexicographically smallest topological sorting.

Input

The first line contains two integers and m~(1 \le n, m \le 10^5) — the number of vertices and edges in the graph. The next lines describe the edges of the graph. Each edge is given by a pair of integers — the starting and ending vertices.

Output

Print the lexicographically smallest topological sorting of the graph as a sequence of vertex numbers. If it is not possible to perform a topological sorting, print .

Examples

Example 1

Loading
Loading