var reach,next:array[1..200000] of longint; cut:array[1..200000] of boolean; cnt,dfn,low:array[1..100000] of longint; n,m,ans,i,j,x,y,cn,tot:longint;
procedureadd(x,y:longint); begin inc(tot); reach[tot]:=y; next[tot]:=cnt[x]; cnt[x]:=tot; end;
proceduretarjan(u,vv:longint); var r,v,i:longint; begin r:=0; inc(cn); low[u]:=cn; dfn[u]:=low[u]; i:=cnt[u]; while i<>-1do begin v:=reach[i]; if dfn[v]=0then begin tarjan(v,vv); low[u]:=min(low[u],low[v]); if (low[v]>=dfn[u])and(u<>vv) then cut[u]:=True; if u=vv then inc(r); end; low[u]:=min(low[u],dfn[v]); i:=next[i]; end; if (u=vv)and(r>=2) then cut[vv]:=True; end;
begin filldword(cnt,sizeof(cnt) div4,maxlongint*2+1); read(n,m); for i:=1to m do begin read(x,y); add(x,y); add(y,x); end;
for i:=1to n do if dfn[i]=0then tarjan(i,i);
for i:=1to n do if cut[i] then inc(ans); writeln(ans); for i:=1to n do if cut[i] then write(i,' '); end.