A bridge of an undirected graph is defined as any edge whose removal increases the number of connected components. Please compute all the bridges of a given graph.
Input consists of several cases, each with the number of vertices , followed by the number of edges , followed by pairs indicating an edge between and , with . Assume , , that vertices are numbered starting from zero, and that there is at most one edge connecting any pair of vertices.
For every graph, print the number of bridges, followed by a line with those bridges. The two vertices of each bridge must be sorted increasingly, and the bridges themselves must also be sorted increasingly. Print a line with 10 dashes at the end of every case.
Input
2 1 0 1 3 3 2 1 0 1 2 0 4 3 2 1 0 1 3 0 7 8 6 5 4 3 6 1 2 3 3 0 2 0 0 6 1 5 6 3 1 5 3 4 4 0
Output
1 0 1 ---------- 0 ---------- 3 0 1 0 3 1 2 ---------- 2 0 6 3 4 ---------- 3 0 4 1 5 3 4 ----------