#include <bits/stdc++.h>
using namespace std;
const int mxn = 17;
int n, m, k;
int p[1 << mxn];
vector<int> g[1 << mxn];
pair<int, int> dfs(int c) {
  pair<int, int> ret = {0, c};
  for (int i : g[c])
    if (i != p[c]) {
      p[i] = c;
      pair<int, int> x = dfs(i);
      x.first++, ret = max(ret, x);
    }
  return ret;
}
pair<int, pair<int, int> > dfs2(int c, int p) {
  pair<int, pair<int, int> > ret;
  vector<int> v;
  for (int i : g[c])
    if (i != p) {
      pair<int, pair<int, int> > x = dfs2(i, c);
      v.push_back(x.first);
      ret.second.first ^= x.second.first, ret.second.second += x.second.second;
    }
  sort(v.begin(), v.end());
  if (!v.empty()) ret.first = v.back() + 1;
  if (v.size() & 1) ret.second.first = c;
  if (!~-v.size())
    ret.second.second += 1 + v[0];
  else if (v.size() == 2)
    ret.second.second += 2 * (v[0] != v[1]);
  else if (v.size() == 3)
    ret.second.second += 1 + (v[0] != v[1]) + (v[1] + 1 != v[2]);
  else if (v.size() > 3)
    ret.second.second += 2;
  return ret;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < (1 << n) - 3; i++) {
    int x, y;
    cin >> x >> y;
    x--, y--;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  p[0] = -1;
  tie(m, k) = dfs(0);
  p[k] = -1;
  tie(m, k) = dfs(k);
  for (int i = 0; 2 * i + 1 < m; i++) k = p[k];
  pair<int, int> ret = dfs2(k, -1).second;
  if (~-ret.second) {
    cout << 0 << '\n';
  } else if (m & 1) {
    cout << 2 << '\n';
    cout << (min(k, p[k]) + 1) << " " << (max(k, p[k]) + 1) << '\n';
  } else {
    cout << 1 << '\n';
    cout << (ret.first + 1) << '\n';
  }
  return 0;
}
