#include <bits/stdc++.h>
using namespace std;
const int N = 17;
int n;
vector<int> nei[1 << N];
set<int> son[1 << N];
void dfs(int x = 1, int fa = 0) {
  for (int i = 0; i < nei[x].size(); i++) {
    int y = nei[x][i];
    if (y == fa) continue;
    son[x].insert(y);
    dfs(y, x);
  }
}
pair<int, int> f[1 << N];
void calc_f(int x) {
  if (son[x].size() == 0)
    f[x] = make_pair(0, 1);
  else if (son[x].size() == 1)
    f[x] = f[*son[x].begin()] == make_pair(0, 1) ? make_pair(x, 2)
                                                 : make_pair(-1, -1);
  else if (son[x].size() == 2) {
    pair<int, int> x1 = f[*son[x].begin()], x2 = f[*++son[x].begin()];
    if (x1 > x2) swap(x1, x2);
    if (!x1.first && !x2.first)
      f[x] = x1.second == x2.second ? make_pair(0, x1.second + 1)
                                    : make_pair(-1, -1);
    else if (!x1.first && x2.first > 0)
      f[x] = x1.second == x2.second ? make_pair(x2.first, x1.second + 1)
                                    : make_pair(-1, -1);
    else
      f[x] = make_pair(-1, -1);
  } else if (son[x].size() == 3) {
    pair<int, int> x1 = f[*son[x].begin()], x2 = f[*++son[x].begin()],
                   x3 = f[*++ ++son[x].begin()];
    if (x1 > x2) swap(x1, x2);
    if (x2 > x3) swap(x2, x3);
    if (x1 > x2) swap(x1, x2);
    if (!x1.first && !x2.first && !x3.first)
      f[x] = x1.second == x2.second && x2.second + 1 == x3.second
                 ? make_pair(x, x3.second + 1)
                 : make_pair(-1, -1);
    else
      f[x] = make_pair(-1, -1);
  } else
    f[x] = make_pair(-1, -1);
}
void dp(int x = 1, int fa = 0) {
  for (int i = 0; i < nei[x].size(); i++) {
    int y = nei[x][i];
    if (y == fa) continue;
    dp(y, x);
  }
  calc_f(x);
}
vector<int> ans;
void dfs0(int x = 1, int fa = 0) {
  if (f[x].first > 0) ans.push_back(f[x].first);
  for (int i = 0; i < nei[x].size(); i++) {
    int y = nei[x][i];
    if (y == fa) continue;
    son[x].erase(y);
    son[y].insert(x);
    calc_f(x);
    calc_f(y);
    dfs0(y, x);
    son[x].insert(y);
    son[y].erase(x);
    calc_f(y);
    calc_f(x);
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= (1 << n) - 3; i++) {
    int x, y;
    cin >> x >> y;
    nei[x].push_back(y);
    nei[y].push_back(x);
  }
  dfs();
  dp();
  dfs0();
  cout << ans.size() << "\n";
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
