#include <bits/stdc++.h>
int DEBUG;
namespace bzs {
using namespace std;
int getint() {
  int tmp;
  scanf("%d", &tmp);
  return tmp;
}
template <typename T>
bool max_update(T &ope, T comp) {
  if (ope < comp) {
    ope = comp;
    return 1;
  }
  return 0;
}
template <typename T>
bool min_update(T &ope, T comp) {
  if (ope > comp) {
    ope = comp;
    return 1;
  }
  return 0;
}
template <typename T>
T tpop(stack<T> &ope) {
  T tmp = ope.top();
  ope.pop();
  return tmp;
}
template <typename T>
T tpop(queue<T> &ope) {
  T tmp = ope.front();
  ope.pop();
  return tmp;
}
template <typename T>
void sort(vector<T> &ope) {
  sort(ope.begin(), ope.end());
}
}  // namespace bzs
using namespace bzs;
struct edge {
  int end;
  int dp, st;
  edge *suc;
  edge *pair;
  edge(int _end, int _st, edge *_suc) {
    end = _end;
    suc = _suc;
    st = _st;
    dp = -1;
  }
} * head[300000];
void add_edge(int u, int v) {
  head[u] = new edge(v, 0, head[u]);
  head[v] = new edge(u, 1, head[v]);
  head[u]->pair = head[v];
  head[v]->pair = head[u];
}
int dp[300000];
int dfs_edge(int st, edge *dg);
int dfs_point(int x) {
  int &t = dp[x];
  if (~t) return t;
  t = 0;
  for (edge *cur = head[x]; cur; cur = cur->suc) {
    t += dfs_edge(cur->end, cur->pair);
  }
  if (DEBUG) printf("dfs_point(%d) return %d\n", x, t);
  return t;
}
int dfs_edge(int st, edge *dg) {
  if (~dg->dp) return dg->dp;
  dg->dp = dfs_point(st) - dfs_edge(dg->end, dg->pair) + dg->st;
  if (DEBUG) printf("dfs_edge(%d->%d) return %d\n", st, dg->end, dg->dp);
  return dg->dp;
}
int dfs_pre(int x, int fa) {
  int res = 0;
  if (DEBUG) printf("dfs_pre %d\n", x);
  fflush(stdout);
  for (edge *cur = head[x]; cur; cur = cur->suc) {
    if (cur->end != fa) {
      int t = dfs_pre(cur->end, x);
      cur->pair->dp = t + cur->pair->st;
      if (DEBUG)
        printf("dfs_edge(%d->%d) return %d\n", cur->end, x, cur->pair->dp);
      res += cur->pair->dp;
    }
  }
  return res;
}
int main() {
  int n = getint();
  for (int(_) = (n - 1 - 1); (_) >= 0; (_)--) {
    int u, v;
    scanf("%d%d", &u, &v);
    add_edge(u, v);
  }
  if (DEBUG) printf("enter pre\n");
  fflush(stdout);
  dfs_pre(1, 0);
  if (DEBUG) printf("end pre\n");
  fflush(stdout);
  vector<int> res;
  memset(dp, -1, sizeof dp);
  for (int i = 1; i <= (n); i++) {
    if (res.empty() || dfs_point(res.back()) < dfs_point(i)) {
      res.clear();
      res.push_back(i);
    } else if (dfs_point(res.back()) == dfs_point(i)) {
      res.push_back(i);
    }
  }
  printf("%d\n", n - 1 - dfs_point(res.back()));
  sort(res);
  for (int i = 0; i < (res.size()); i++) printf("%d ", res[i]);
  return 0;
}
