#include <bits/stdc++.h>
using namespace std;
class DebugStream {
} LOG;
template <typename T>
DebugStream &operator<<(DebugStream &s, const T &) {
  return s;
}
mt19937 rnd(time(NULL));
const int maxN = 2e5 + 9, maxV = 1e6 + 9, MOD = 1e9 + 7, SQ = 335, lg = 20,
          bs = 29;
int pw, n, sz[maxN];
vector<int> meromero, adj[maxN];
void prec(int nd, int an) {
  sz[nd] = 1;
  for (int sn : adj[nd])
    if (sn != an) {
      prec(sn, nd);
      sz[nd] += sz[sn];
    }
}
int getcent(int nd, int an) {
  for (int sn : adj[nd])
    if (sn != an &&
        (sz[sn] * 2 > n || (sz[sn] * 2 == n && adj[sn].size() == 2)))
      return getcent(sn, nd);
  return nd;
}
void no() {
  cout << "0\n";
  exit(0);
}
void dfs(int nd, int an) {
  if (an != -1) adj[nd].erase(find(adj[nd].begin(), adj[nd].end(), an));
  sz[nd] = 1;
  LOG << nd + 1 << '\n';
  for (int sn : adj[nd]) {
    dfs(sn, nd);
    sz[nd] += sz[sn];
  }
  sort(adj[nd].begin(), adj[nd].end(),
       [&](int a, int b) { return sz[a] < sz[b]; });
  if (adj[nd].empty()) return;
  if (adj[nd].size() >= 2 && sz[adj[nd][0]] != sz[adj[nd][1]]) no();
  if ((adj[nd].size() == 3 && sz[adj[nd][0]] * 2 + 1 == sz[adj[nd].back()]) ||
      (adj[nd].size() == 1 && sz[adj[nd][0]] == 1)) {
    meromero.push_back(nd);
    sz[nd]++;
    return;
  }
  if (adj[nd].size() != 2) no();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> pw;
  n = (1 << pw) - 2;
  for (int i = 1, u, v; i < n; i++) {
    cin >> u >> v;
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  prec(0, -1);
  int rt = getcent(0, -1);
  dfs(rt, -1);
  if (meromero.size() != 1) no();
  if (meromero[0] == rt) {
    cout << "2\n";
    int a = rt + 1, b = adj[rt].back() + 1;
    if (a > b) swap(a, b);
    cout << a << ' ' << b << '\n';
  } else {
    cout << "1\n";
    cout << meromero[0] + 1 << '\n';
  }
}
