PROGRAMMING:Generalized search of Graphs
Outputs the first generalized sequence of the given starting point of an undirected graph.
###Input format:
Input the first line to give three positive integers, which respectively represent the number of nodes n (1 < n ≤ 10), the number of edges m (≤ 50) and the number of exploration start nodes s (nodes are numbered from 1 to n).
The following M rows correspond to m edges, and each row gives a pair of positive integers, which are the numbers of the two nodes directly connected by the edge.
###Output format:
Output the first wide search sequence of undirected graph starting from s, separated by a space, and finally with a space; If it is a non connected graph, output a 0 from another line at the end, indicating that the graph is not connected.
Because the node sequence of breadth first traversal is not unique, in order to make the output have a unique result, we agree to construct the adjacency table with the header insertion method.
###Input example:
```in
6 8 2
1 2
2 3
3 4
4 5
5 6
6 4
3 6
1 5
```
###Output example:
```out
2 3 1 6 4 5
```
answer:If there is no answer, please comment
###Input format:
Input the first line to give three positive integers, which respectively represent the number of nodes n (1 < n ≤ 10), the number of edges m (≤ 50) and the number of exploration start nodes s (nodes are numbered from 1 to n).
The following M rows correspond to m edges, and each row gives a pair of positive integers, which are the numbers of the two nodes directly connected by the edge.
###Output format:
Output the first wide search sequence of undirected graph starting from s, separated by a space, and finally with a space; If it is a non connected graph, output a 0 from another line at the end, indicating that the graph is not connected.
Because the node sequence of breadth first traversal is not unique, in order to make the output have a unique result, we agree to construct the adjacency table with the header insertion method.
###Input example:
```in
6 8 2
1 2
2 3
3 4
4 5
5 6
6 4
3 6
1 5
```
###Output example:
```out
2 3 1 6 4 5
```
answer:If there is no answer, please comment