#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 200100;
const long long INF = 2000000100;
const long long MOD = 998244353;
int Nexp, N;
vector<int> graph[MAXN];
pair<int, int> nxt[MAXN];
vector<int> S[MAXN];
void remove(vector<int>& v, int n) {
  int ind;
  for (ind = 0; ind < (int)v.size(); ind++) {
    if (v[ind] == n) break;
  }
  for (int i = ind; i < (int)v.size() - 1; i++) {
    v[i] = v[i + 1];
  }
  v.pop_back();
}
void remove(int a, int b) {
  remove(graph[a], b);
  remove(graph[b], a);
}
void insert(int a, int b) {
  graph[a].push_back(b);
  graph[b].push_back(a);
}
void dfs(int n, int p) {
  pair<int, int> a = pair<int, int>(0, -1);
  for (int i = 0; i < (int)graph[n].size(); i++) {
    int c = graph[n][i];
    if (c != p) {
      dfs(c, n);
      if (nxt[c].first > a.first) {
        a = pair<int, int>(nxt[c].first, c);
      }
    }
  }
  a.first++;
  nxt[n] = a;
}
bool isbintree(int n, int p, int d) {
  if (d > Nexp) return false;
  int s = 0;
  for (int i = 0; i < (int)graph[n].size(); i++) {
    int c = graph[n][i];
    if (c != p) {
      if (!isbintree(c, n, d + 1)) return false;
      s++;
    }
  }
  if (s != 0 && s != 2) return false;
  return true;
}
bool isbintree(int n) { return isbintree(n, -1, 1); }
bool isvalid(int r, int n) {
  bool ok = false;
  if (graph[n].size() == 2) {
    insert(N - 1, n);
    if (isbintree(r)) ok = true;
    remove(N - 1, n);
  } else if (graph[n].size() <= 4) {
    vector<int> g;
    if (graph[n].size() == 3) {
      g.push_back(graph[n][0]);
      g.push_back(graph[n][1]);
      g.push_back(graph[n][2]);
      g.push_back(graph[n][0]);
    } else {
      g.push_back(graph[n][0]);
      g.push_back(graph[n][1]);
      g.push_back(graph[n][2]);
      g.push_back(graph[n][0]);
      g.push_back(graph[n][3]);
      g.push_back(graph[n][1]);
      g.push_back(graph[n][2]);
      g.push_back(graph[n][3]);
    }
    for (int i = 0; i < (int)g.size() - 1; i++) {
      int a = g[i], b = g[i + 1];
      remove(n, a);
      remove(n, b);
      insert(n, N - 1);
      insert(N - 1, a);
      insert(N - 1, b);
      if (isbintree(r)) ok = true;
      insert(n, a);
      insert(n, b);
      remove(n, N - 1);
      remove(N - 1, a);
      remove(N - 1, b);
    }
  }
  return ok;
}
void outgraph() {
  for (int i = 1; i <= N - 1; i++) {
    for (int j = 0; j < (int)graph[i].size(); j++) {
      int c = graph[i][j];
      if (c > i) cerr << i << " " << c << "\n";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> Nexp;
  N = (1 << Nexp);
  int a, b;
  for (int i = 0; i < N - 3; i++) {
    cin >> a >> b;
    graph[a].push_back(b);
    graph[b].push_back(a);
  }
  for (int i = 1; i <= N - 2; i++) S[graph[i].size()].push_back(i);
  dfs(1, -1);
  int r = 1;
  while (nxt[r].second != -1) r = nxt[r].second;
  dfs(r, -1);
  int l = nxt[r].first;
  for (int i = 0; i < (l - 1) / 2; i++) r = nxt[r].second;
  int r1 = nxt[r].second;
  if (Nexp == 2) {
    cout << "2\n1 2\n";
    return 0;
  }
  if (S[2].size() > 2 || S[4].size() > 1) {
    cout << "0\n";
    return 0;
  }
  vector<int> ans;
  if (isvalid(r, r) || isvalid(r1, r)) ans.push_back(r);
  if (isvalid(r, r1) || isvalid(r1, r1)) ans.push_back(r1);
  if (S[2].size() >= 1 && S[2][0] != r && S[2][0] != r1 &&
      (isvalid(r, S[2][0]) || isvalid(r1, S[2][0])))
    ans.push_back(S[2][0]);
  if (S[2].size() >= 2 && S[2][1] != r && S[2][1] != r1 &&
      (isvalid(r, S[2][1]) || isvalid(r1, S[2][1])))
    ans.push_back(S[2][1]);
  if (S[4].size() >= 1 && S[4][0] != r && S[4][0] != r1 &&
      (isvalid(r, S[4][0]) || isvalid(r1, S[4][0])))
    ans.push_back(S[4][0]);
  sort(ans.begin(), ans.end());
  int sz = ans.size();
  cout << sz << "\n";
  for (int i = 0; i < sz; i++) {
    cout << ans[i] << (i == sz - 1 ? "\n" : " ");
  }
}
