1785: 欧拉回路

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:27 Solved:8

Description

寻找一个图的欧拉路的算法实现

Input

若干行 第一位分别为点的数量与边的数量 后续行分别为边的两个点

Output

一行欧拉回路

Sample Input Copy

5 5
1 2
2 3
3 4
4 5
5 1

Sample Output Copy

1 5 4 3 2 1