The undirected graph is given. Start a depth-first search from the given vertex and print the vertex numbers in the order of their first visit.
The first line contains the number of vertices n~(n \le 100) and edges of the graph. Each of the following lines contains two vertices and — an undirected edge of the graph. The last line contains the vertex .
Start a depth-first search from vertex and print the vertex numbers in the order of their first visit.

1. példa
2. példa