Separation ---------- In a network, a node that can disconnect the network if it fails is called a `cut vertex' or `articulation point'. An edge that can disconnect the network if it fails is called a `cut edge' or `bridge'. More specifically, an articulation point is a vertex of a connected undirected graph which when removed, along with all the edges of which it is an end point, disconnects the graph. And a bridge is an edge of a connected undirected graph which when removed discon- nects the graph. You have been asked to find all the articulation points and bridges of a very large network (undirected graph). Input ----- For each test case, first a line that gives the test case name. Then a line of the form M N giving the number of vertices M and number of edges N. Vertices are given identifiers 1, 2, 3, ..., M. Then N lines, one per edge, each of the form i j specifying the the edge connects vertex i to vertex j. Each edge appears only once. 2 <= M <= 50,000 1 <= N <= 1,000,000 Input terminates with an end of file. The test case name line is at most 80 characters. Output ------ For each test case, first an exact copy of the test case name line. Then a line containing m n where m is the number of articulation points and n is the number of bridges. This is followed by m lines, one for each articulation point, each of the form i where i is the vertex ID of the articulation point. These lines MUST BE SORTED in order of increasing i. Lastly there are n lines, one for each bridge, each of the form i j where the bridge connects vertices with IDs i and j. Here i < j is REQUIRED, and the bridge lines MUST BE SORTED in order of increasing i and for equal i in order of increasing j. Sample Input ------ ----- -- SAMPLE 1 -- 2 1 1 2 -- SAMPLE 2 -- 4 4 1 2 2 3 3 4 4 1 -- SAMPLE 3 -- 4 3 1 2 2 3 3 4 -- SAMPLE 4 -- 7 8 1 2 1 3 2 3 3 4 4 5 5 6 6 7 7 4 -- SAMPLE 5 -- 9 9 1 2 2 3 3 4 4 5 5 6 6 1 7 1 8 3 9 5 Sample Output ------ ------ -- SAMPLE 1 -- 0 1 1 2 -- SAMPLE 2 -- 0 0 -- SAMPLE 3 -- 2 3 2 3 1 2 2 3 3 4 -- SAMPLE 4 -- 2 1 3 4 3 4 -- SAMPLE 5 -- 3 3 1 3 5 1 7 3 8 5 9 File: separation.txt Author: Bob Walton Date: Sat Sep 16 01:28:30 EDT 2017 The authors have placed this file in the public domain; they make no warranty and accept no liability for this file.