Skip to content

P10003

P1003 割点

Description

给出一个 \(n\) 个点,\(m\) 条边的无向图,求图的割点。

Format

Input

第一行输入两个正整数 \(n,m\)

下面 \(m\) 行每行输入两个正整数 \(x,y\) 表示 \(x\)\(y\) 有一条边。

对于 \(40\%\) 数据,\(1\le n\le 2\times 10^3\)\(1\le m\le 5\times 10^3\)

对于全部数据,\(1\le n\le 2\times 10^5\)\(1\le m\le 5\times 10^5\),顶点编号都是 \(1∼n\) 的整数。

图不一定联通。

Output

第一行输出割点个数。

第二行按照节点编号从小到大输出节点,用空格隔开。

Samples

Sample Input 1

6 7
1 2
1 3
1 4
2 5
3 5
4 5
5 6

Sample Output 1

1 
5