#include using namespace std; typedef unsigned int uint; typedef long long int ll; typedef unsigned long long int ull; #define debugv(v) printf("L%d %s => ",__LINE__,#v);for(auto e:v){cout< ",__LINE__,#m);for(int x=0;x<(w);x++){cout<<(m)[x]<<" ";}cout< ostream& operator <<(ostream &o,const pair p){o<<"("<>> edge; map place[2]; int main(){ int i,j,k,l; cin>>n>>m>>kei; for (i=0;i>k; for (auto e:edge[k]){ place[0][e.first]=place[0][e.second]=true; } for (i=1;i> &path=edge[k]; for(auto p:place[~i&1]){ for (auto e:path){ if (p.first==e.first){ place[i&1][e.second]=true; } if (p.first==e.second){ place[i&1][e.first]=true; } } } place[~i&1].clear(); } map &result=place[~i&1]; printf("%d\n",result.size()); for (auto p:result){ printf("%d ",p.first); } cout<