#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
const int mod = 1e9 + 7;
int n, m, r1, r2, ans;
bool ok;
int sz[N];
bool vis[N];
vector<int> g[N];
void dfs(int u, int fa) {
  sz[u] = 1;
  for (auto v : g[u])
    if (v != fa) {
      dfs(v, u);
      if (sz[v] == m >> 1 && !r1) r1 = u, r2 = v;
      sz[u] += sz[v];
    }
}
void solve(int u, int fa, int id) {
  if (id <= m + 1)
    vis[id] = 1;
  else {
    ok = 0;
    return;
  }
  vector<int> son;
  for (auto v : g[u])
    if (v != fa) son.push_back(v);
  if (son.size() == 0)
    return;
  else if (son.size() == 1) {
    if (!ans)
      ans = u;
    else {
      ok = 0;
      return;
    }
    if ((id << 1 | 1) <= m + 1)
      vis[id << 1 | 1] = 1;
    else {
      ok = 0;
      return;
    }
    solve(son[0], u, id << 1);
  } else if (son.size() == 2) {
    solve(son[0], u, id << 1);
    solve(son[1], u, id << 1 | 1);
  } else if (son.size() == 3) {
    if (!ans)
      ans = u;
    else {
      ok = 0;
      return;
    }
    if (id << 1 <= m + 1)
      vis[id << 1] = 1;
    else {
      ok = 0;
      return;
    }
    sort(son.begin(), son.end(), [](int x, int y) { return sz[x] < sz[y]; });
    solve(son[0], u, (id << 1) << 1);
    solve(son[1], u, (id << 1) << 1 | 1);
    solve(son[2], u, id << 1 | 1);
  } else {
    ok = 0;
    return;
  }
}
int main() {
  scanf("%d", &n);
  m = (1 << n) - 2;
  for (int i = 1; i < m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1, 0);
  if (!r1) return cout << 0, 0;
  vector<int> res;
  ok = 1, ans = 0;
  dfs(r1, 0);
  solve(r1, 0, 1);
  if (ok)
    for (int i = 1; i <= m + 1; i++)
      if (!vis[i]) {
        ok = 0;
        break;
      }
  if (ok) res.push_back(ans);
  ok = 1, ans = 0;
  memset(vis + 1, 0, m + 1);
  dfs(r2, 0);
  solve(r2, 0, 1);
  if (ok)
    for (int i = 1; i <= m + 1; i++)
      if (!vis[i]) {
        ok = 0;
        break;
      }
  if (ok) res.push_back(ans);
  cout << res.size() << endl;
  sort(res.begin(), res.end());
  for (auto x : res) cout << x << ' ';
  return 0;
}
