#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
void ckmin(T &a, U b) {
  if (a > b) a = b;
}
template <class T, class U>
void ckmax(T &a, U b) {
  if (a < b) a = b;
}
const int MAXN = 17;
int N, R = -1, S = -1;
vector<int> edge[(1 << MAXN)];
int depth[(1 << MAXN)], parent[(1 << MAXN)], subtree[(1 << MAXN)];
vector<int> ans;
void dfs(int u, int p) {
  if (p != (1 << N) - 1) {
    edge[u].erase(find((edge[u]).begin(), (edge[u]).end(), p));
  }
  subtree[u] = 1;
  for (int v : edge[u]) {
    depth[v] = depth[u] + 1;
    parent[v] = u;
    dfs(v, u);
    subtree[u] += subtree[v];
  }
  if (((int)(edge[u]).size()) == 3) {
    int x = edge[u][0], y = edge[u][1], z = edge[u][2];
    if (subtree[x] > subtree[y] && subtree[y] == subtree[z]) S = x;
    if (subtree[y] > subtree[z] && subtree[z] == subtree[x]) S = y;
    if (subtree[z] > subtree[x] && subtree[x] == subtree[y]) S = z;
  }
  if (p != (1 << N) - 1) {
    edge[u].push_back(p);
  }
  return;
}
void dfs2(int u, int p) {
  if (p != (1 << N) - 1) {
    edge[u].erase(find((edge[u]).begin(), (edge[u]).end(), p));
  }
  if (((int)(edge[u]).size()) != 0 && ((int)(edge[u]).size()) != 2) {
    S = -2;
  }
  subtree[u] = 1;
  for (int v : edge[u]) {
    if (v == p) continue;
    dfs2(v, u);
    subtree[u] += subtree[v];
  }
  if (((int)(edge[u]).size()) == 2 &&
      subtree[edge[u][0]] != subtree[edge[u][1]])
    S = -2;
  if (p != (1 << N) - 1) {
    edge[u].push_back(p);
  }
}
void dfs1(int u, int p) {
  for (int v : edge[u]) {
    if (v == p) continue;
    depth[v] = depth[u] + 1;
    parent[v] = u;
    dfs1(v, u);
  }
}
void solve1() {
  dfs1(0, (1 << N) - 1);
  for (auto i = (0); i < ((1 << N) - 1); i++) {
    if (R == -1 || depth[i] > depth[R]) {
      R = i;
    }
  }
  depth[R] = 0;
  dfs1(R, (1 << N) - 1);
  for (auto i = (0); i < ((1 << N) - 1); i++) {
    if (S == -1 || depth[i] > depth[S]) {
      S = i;
    }
  }
  if ((depth[S] ^ 1) & 1) {
    return;
  }
  int d = depth[S];
  int u = S;
  for (auto i = (0); i < ((d >> 1)); i++) u = parent[u];
  int v = parent[u];
  edge[u].erase(find((edge[u]).begin(), (edge[u]).end(), v));
  edge[v].erase(find((edge[v]).begin(), (edge[v]).end(), u));
  S = -1;
  depth[u] = 1;
  dfs2(u, (1 << N) - 1);
  depth[v] = 1;
  dfs2(v, (1 << N) - 1);
  if (S == -1) {
    ans.push_back(u);
    ans.push_back(v);
  }
}
void solve() {
  depth[R] = 0;
  dfs(R, (1 << N) - 1);
  if (S == -1) return;
  int u = parent[S];
  for (auto i = (0); i < (((int)(edge[u]).size())); i++) {
    int v = edge[u][i];
    if (v == parent[u] || v == S) continue;
    edge[v].erase(find((edge[v]).begin(), (edge[v]).end(), u));
    edge[v].push_back((1 << N) - 2);
    edge[u][i] = (1 << N) - 2;
    edge[(1 << N) - 2].push_back(v);
  }
  edge[(1 << N) - 2].push_back(u);
  sort((edge[u]).begin(), (edge[u]).end());
  edge[u].erase(unique((edge[u]).begin(), (edge[u]).end()), edge[u].end());
  S = -1;
  dfs2(R, (1 << N) - 1);
  if (S == -1) {
    ans.push_back(u);
  }
  return;
}
void solve2() {
  int T = S;
  S = -1;
  edge[R].push_back((1 << N) - 2);
  edge[(1 << N) - 2].push_back(R);
  dfs2(T, (1 << N) - 1);
  if (S == -1) {
    ans.push_back(R);
  }
  edge[R].erase(find((edge[R]).begin(), (edge[R]).end(), (1 << N) - 2));
  edge[(1 << N) - 2].erase(
      find((edge[(1 << N) - 2]).begin(), (edge[(1 << N) - 2]).end(), R));
  swap(R, T);
  S = -1;
  edge[R].push_back((1 << N) - 2);
  edge[(1 << N) - 2].push_back(R);
  dfs2(T, (1 << N) - 1);
  if (S == -1) {
    ans.push_back(R);
  }
  return;
}
int32_t main() {
  cout << fixed << setprecision(12);
  cerr << fixed << setprecision(4);
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  if (N == 2) {
    cout << "2\n1 2\n";
    return 0;
  }
  for (auto i = (0); i < ((1 << N) - 3); i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
  for (auto i = (0); i < ((1 << N) - 1); i++) {
    if (((int)(edge[i]).size()) == 2) {
      if (R == -1)
        R = i;
      else
        S = i;
    }
  }
  if (R == -1) {
    solve1();
  } else {
    if (S == -1)
      solve();
    else
      solve2();
  }
  sort((ans).begin(), (ans).end());
  cout << ((int)(ans).size()) << '\n';
  for (auto i = (0); i < (((int)(ans).size())); i++) {
    cout << ans[i] + 1 << " \n"[i == ((int)(ans).size()) - 1];
  }
  return 0;
}
