#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &item) {
  out << '(' << item.first << ", " << item.second << ')';
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &v) {
  out << v.size() << '\n';
  for (const auto &item : v) out << item << ' ';
  return out;
}
const int N = (1 << 17) + 10;
int n, h[N], hmax, sz[N];
vector<int> adj[N], cands, stk;
pii dfs(int v, int p = -1) {
  pii res = {v, h[v]};
  for (auto u : adj[v])
    if (u != p) {
      h[u] = 1 + h[v];
      auto ret = dfs(u, v);
      if (h[u] > res.second) res = ret;
    }
  return res;
}
void getCands(int v, int p = -1) {
  stk.push_back(v);
  if (h[v] >= hmax) {
    hmax = h[v];
    if (h[v] % 2)
      cands = {stk[h[v] / 2], stk[h[v] / 2 + 1]};
    else
      cands = {stk[h[v] / 2]};
  }
  for (auto u : adj[v])
    if (u != p) {
      h[u] = 1 + h[v];
      getCands(u, v);
    }
  stk.pop_back();
}
bool isp2(int x) { return ((x & (x - 1)) == 0); }
int x, nn, definitelyNot;
bool solve(int v, int p = -1) {
  sz[v] = 1;
  int nr[2] = {0, 0};
  vector<int> vsz;
  for (auto u : adj[v])
    if (u != p) {
      h[u] = 1 + h[v];
      bool ret = solve(u, v);
      vsz.push_back(sz[u]);
      sz[v] += sz[u];
      ++nr[ret];
    }
  if (vsz.size() > 3) definitelyNot = true;
  if (vsz.size() == 0) return true;
  if (vsz.size() == 1) {
    if (vsz[0] != 1) definitelyNot = true;
    if (x == -1) x = v;
    return false;
  }
  if (vsz.size() == 2) {
    if (nr[0] == 0 && nr[1] == 2 && vsz[0] == vsz[1]) return true;
    if (nr[0] == 1 && nr[1] == 1 && abs(vsz[0] - vsz[1]) == 1 &&
        isp2(1 + max(vsz[0], vsz[1])))
      return false;
    definitelyNot = true;
    return false;
  }
  sort(vsz.begin(), vsz.end());
  if (!isp2(1 + vsz[2])) return definitelyNot = true, false;
  if (vsz[0] != vsz[2] / 2 || vsz[1] != vsz[2] / 2)
    return definitelyNot = true, false;
  if (x == -1) x = v;
  return false;
}
bool ok(int v, int n) {
  memset(h, 0, sizeof h);
  x = -1;
  definitelyNot = false;
  if (solve(v)) return false;
  return !definitelyNot;
}
int main() {
  ios_base::sync_with_stdio(false);
  int m, a, b;
  cin >> n;
  nn = n;
  m = (1 << n) - 3;
  n = (1 << n) - 2;
  for (int i = 1; i <= m; ++i) {
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  int x = dfs(1).first;
  memset(h, 0, sizeof h);
  getCands(x);
  vector<int> ans;
  for (auto v : cands)
    if (ok(v, n)) ans.push_back(::x);
  sort(ans.begin(), ans.end());
  cout << ans << '\n';
  return 0;
}
