King's Inspection

Find the lexicographically smallest directed tour that starts and ends at city 1 and visits every other city exactly once.

Hard8GraphBacktrackingDFSNo attempts yetTime limit10sMemory limit512 MB

Problem

King Karl is a responsible and diligent ruler. Every year he travels across his country to check that all cities are doing well.

There are nn cities and mm roads in his country. To control the travelers, every road is one way: a road from city aa to city bb cannot be used to go from bb to aa.

Karl wants to travel along the roads so that he starts in the capital, visits every non capital city exactly once, and finishes in the capital again.

As the transport minister, you have to find such a route, or determine that no such route exists.

Input

The first line contains two integers nn and mm (2n1000002 \le n \le 100\,000, 0mn+200 \le m \le n + 20), the number of cities and the number of roads.

Each of the next mm lines contains two integers aia_i and bib_i (1ai,bin1 \le a_i, b_i \le n), meaning that there is a one way road from city aia_i to city bib_i. Cities are numbered from 1 to nn, and the capital is city 1. The same road may be given several times, and a road with ai=bia_i = b_i may be given as well.

Output

If a route exists that starts in the capital, passes through every non capital city exactly once and finishes in the capital, print the n+1n+1 city numbers of the route on one line, separated by single spaces. Print the capital both at the beginning and at the end of the route. If several such routes exist, compare the n+1n+1 numbers from the front and print the lexicographically smallest one.

If there is no such route, print There is no route, Karl! on one line.