Олимпиадный тренинг

Задача 24725. Search for bridges and articulation points


Задача

Темы:

Find all bridges and articulation points in the graph (vertex numbers are black, edges are red). Give your answer in ascending order of numbers.
You need to complete the code so that the program displays the numbers of the bridges on the first line and the numbers of the articulation points on the second line.