# TopCoder

icube
baluteshih 好強 <(_ _)>

100.0% (3/3)

100.0% (4/4)

# Description

「群體」跟「個體」有個很重要的性質：如果群體或個體 $G$ 可以跟群體或個體 $H$ 間接聯繫，則 $H$ 跟 $G$ 不能間接聯繫！

# Input Format

• $0 \le N \le 2 \times 10^ 5$
• $0 \le M \le 2 \times 10^ 5$
• $a_i \ne b_i$
• $0 \le a_i, b_i \le N$

# Sample Input 1

13
20
(1 2), (2 3), (3 1), (4 1), (4 11), (4 8), (4 5), (5 6), (6 7), (7 5), (8 9), (9 10), (10 8), (11 12), (12 13), (13 11), (1 7), (2 12), (6 9), (13 10)

# Sample Output 1

4
4
1 2 3 5 6 7 8 9 10 11 12 13

# Sample Input 2

16
24
(1 2), (2 3), (3 1), (4 5), (5 6), (6 7), (7 4), (8 9), (9 10), (10 8), (11 12), (12 13), (13 11), (14 15), (15 16), (16 14), (1 4), (9 5), (7 11), (14 6), (2 8), (3 12), (15 10), (16 13)

5
1 2 3 14 15 16
4 5 6 7

# Problem Source

No. Testdata Range Score
1 0~34 1

# Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 262144 262144 1
1 1000 262144 262144 1
2 1000 262144 262144 1
3 1000 262144 262144 1
4 1000 262144 262144 1
5 1000 262144 262144 1
6 1000 262144 262144 1
7 1000 262144 262144 1
8 1000 262144 262144 1
9 1000 262144 262144 1
10 1000 262144 262144 1
11 1000 262144 262144 1
12 1000 262144 262144 1
13 1000 262144 262144 1
14 1000 262144 262144 1
15 1000 262144 262144 1
16 1000 262144 262144 1
17 1000 262144 262144 1
18 1000 262144 262144 1
19 1000 262144 262144 1
20 1000 262144 262144 1
21 1000 262144 262144 1
22 1000 262144 262144 1
23 1000 262144 262144 1
24 1000 262144 262144 1
25 1000 262144 262144 1
26 1000 262144 262144 1
27 1000 262144 262144 1
28 1000 262144 262144 1
29 1000 262144 262144 1
30 1000 262144 262144 1
31 1000 262144 262144 1
32 1000 262144 262144 1
33 1000 262144 262144 1
34 1000 262144 262144 1