LearnPy Hub
← Arena
AdvancedRating 1900

Critical Computers

In an undirected network, a computer is critical if removing it (with its cables) splits some still-connected computers apart. Print all critical computers in increasing order, or NONE.

Input

n and m; then m lines 'u v'.

Output

One line.

Sample 1

Input
5 5
1 2
2 3
3 1
3 4
4 5
Output
3 4

Sample 2

Input
3 3
1 2
2 3
3 1
Output
NONE
solution.py
Output appears here
Critical Computers · Python Arena problem · LearnPy Hub