#include <bits/stdc++.h>
using namespace std;
const int MX = (1 << 17) + 5;
int n, k, d[MX], p[MX], lvl[MX], pro[MX];
vector<int> adj[MX], cd, res, gra[MX], g3, g1;
queue<int> q;
void dfs(int u, int par = -1) {
  if (adj[u].size() - (par != -1) == 3) g3.push_back(u);
  if (adj[u].size() - (par != -1) == 1) g1.push_back(u);
  pro[u] = lvl[u];
  for (int v : adj[u])
    if (v != par) {
      p[v] = u;
      lvl[v] = lvl[u] + 1;
      dfs(v, u);
      pro[u] = max(pro[u], pro[v]);
    }
}
bool mcDick(int u, int p, int lvl) {
  if (gra[u].size() - (p != -1) == 0) return lvl == k - 1;
  if (gra[u].size() - (p != -1) != 2) return 0;
  for (int v : gra[u])
    if (v != p && !mcDick(v, u, lvl + 1)) return 0;
  return 1;
}
void solve(int r) {
  g1.clear(), g3.clear();
  lvl[r] = 0, p[r] = -1;
  dfs(r);
  if (g1.size() + g3.size() != 1) return;
  for (int i = 1; i <= n; i++) gra[i] = adj[i];
  if (g1.size()) {
    gra[g1.back()].push_back(n + 1);
    gra[n + 1] = {g1.back()};
    if (mcDick(r, -1, 0)) res.push_back(g1.back());
  } else {
    int u = g3.back();
    vector<int> aux;
    for (int v : adj[u])
      if (v != p[u] && pro[v] != pro[u]) aux.push_back(v);
    if (aux.size() != 2) return;
    gra[u].clear();
    for (int v : adj[u])
      if (v != aux[0] && v != aux[1]) gra[u].push_back(v);
    gra[u].push_back(n + 1);
    gra[n + 1] = {u, aux[0], aux[1]};
    gra[aux[0]].clear();
    for (int v : adj[aux[0]])
      if (v != u) gra[aux[0]].push_back(v);
    gra[aux[0]].push_back(n + 1);
    gra[aux[1]].clear();
    for (int v : adj[aux[1]])
      if (v != u) gra[aux[1]].push_back(v);
    gra[aux[1]].push_back(n + 1);
    if (mcDick(r, -1, 0)) res.push_back(u);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> k;
  n = (1 << k) - 2;
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  memset(d, -1, sizeof(d));
  for (int i = 1; i <= n; i++)
    if (adj[i].size() == 1) {
      q.push(i);
      d[i] = 0;
    }
  int mx = 0;
  while (q.size()) {
    int u = q.front();
    q.pop();
    for (int v : adj[u])
      if (d[v] == -1) {
        q.push(v);
        d[v] = d[u] + 1;
        mx = d[v];
      }
  }
  for (int i = 1; i <= n; i++)
    if (d[i] == mx) cd.push_back(i);
  if (cd.size() > 2) {
    cout << 0 << '\n';
    return 0;
  }
  for (int x : cd) solve(x);
  cout << res.size() << '\n';
  for (int x : res) cout << x << " ";
  cout << '\n';
  return 0;
}
