7408 - Obstacle to Meet   

Description

You are someone. You don’t see some girl for long days. You are very angry and confused. There must be some things or some ones to prevent you from doing so. You need to be more active. You decide to take a tour in the campus to look for some girl at regular time. At regular time, you will traverse every road inside the campus. So, you want to find a way to traverse all roads and to avoid traversing some road twice. The source and the destination of the path must be the dormitory. Can you find the path?

 

Input

 

Each test case starts with a line containing three integers n(1<=n<=105), and m(1<=m<=106)  indicating the number of locations on the map, and the number of the directed roads you want to check. Following this are m lines, each containing 2 integers representing the endpoints of the directed road ui, vi(0<=ui,vi . The number of the location of the dormitory is 0.

 

 

Output

For each test case, output one line containing the best lexical order of the tour. If the tour doesn’t exist, please output “No Way”.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss