#include using namespace std; int N; vector G[100010]; int dp[100010]; int dp2[100010]; bool ans[100010]; void dfs(int u, int p) { dp[u] = 1; for(int v : G[u]) { if(v == p) continue; dfs(v, u); dp[u] &= !dp[v]; } } void dfs2(int u, int p, int carryin) { dp2[u] = 0; for(int v : G[u]) { if(v == p) dp2[u] += !carryin; else dp2[u] += !dp[v]; } //cout<> N; for(int i = 0; i < N-1; ++i) { int a, b; cin >> a >> b; --a, --b; G[a].push_back(b); G[b].push_back(a); } dfs(0, -1); dfs2(0, -1, 0); cout << count(ans, ans+N, true) << endl; for(int i = 0; i < N; ++i) { if(ans[i]) cout << i+1 << endl; } return 0; }