Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EIUDFS2 - DFS Undirected Graph

Given a undirected graph, print the order of visiting vertex using Deep-First Search algorithm from vertex 0 and smallest vertex is prioritized than other vertices.

Input

The first line consists of two positive integers, the number n vertices  (0<n<105) and the number of edges m  (0<m<2x105).

Then there are m lines, each containing two integers u and v  representing an edge which connects u and v.(u,v<105).

Output

Print the list of vertices separated by spaces.

Example

Input:
4 4
0 3
3 2
1 0
0 1
Output:
0 1 3 2

Added by:Ha Minh Ngoc
Date:2015-12-30
Time limit:1s-1.100s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: GOSU
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.