#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int f = 1, x = 0;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline long long readll() {
  long long f = 1, x = 0;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int MAXN = 1e6 + 5;
vector<int> G[MAXN];
int n, m, f[MAXN], sz[MAXN], root;
void getroot(int u, int fa) {
  sz[u] = 1;
  f[u] = 0;
  for (int i = 0; i < (int)G[u].size(); ++i) {
    int v = G[u][i];
    if (v == fa) continue;
    getroot(v, u);
    sz[u] += sz[v];
    f[u] = max(f[u], sz[v]);
  }
  f[u] = max(f[u], n - sz[u]);
  root = f[u] < f[root] ? u : root;
}
int mis, b, mst, dep[MAXN], dfn[MAXN], ofn[MAXN], cnt;
vector<int> le;
void dfs(int u, int fa) {
  dfn[u] = ++cnt;
  dep[u] = dep[fa] + 1;
  int ss = G[u].size() - (fa != 0);
  if (!ss) le.push_back(u);
  if (ss > 3) {
    b = 1;
    return;
  }
  if (mis && (ss == 1 || ss == 3)) {
    b = 1;
    return;
  }
  if (ss == 1 || ss == 3) mis = u, mst = ss;
  for (int i = 0; i < (int)G[u].size(); ++i) {
    int v = G[u][i];
    if (v == fa) continue;
    dfs(v, u);
    if (b) return;
  }
  ofn[u] = cnt;
}
int check(int rt) {
  mis = b = mst = 0;
  le.clear();
  cnt = 0;
  dfs(rt, 0);
  if (b || !mis) return 0;
  if (le.size() > (1 << (m - 1)) || le.size() < (1 << (m - 1)) - 1) return 0;
  if (mst == 1 && le.size() != (1 << (m - 1)) - 1) return 0;
  if (mst == 3 && le.size() == (1 << (m - 1)) - 1) return 0;
  int mx = 0, mn = n + 1;
  for (int i = 0; i < (int)le.size(); ++i)
    mx = max(mx, dep[le[i]]), mn = min(mn, dep[le[i]]);
  if (mx - mn > 1) return 0;
  if (mx != mn && (mn != m - 1 || mx != m)) return 0;
  if (mn == mx) {
    if (mst != 1) return 0;
  } else {
    for (int i = 0; i < (int)le.size(); ++i) {
      if (dep[le[i]] == mn) {
        if (dfn[le[i]] > ofn[mis] || dfn[le[i]] < dfn[mis]) return 0;
      }
    }
  }
  return mis;
}
int main() {
  m = read();
  n = (1 << m) - 2;
  for (int i = 1; i < n; ++i) {
    int u = read(), v = read();
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 1; i <= n; ++i)
    if (G[i].size() > 4) {
      cout << 0 << endl;
      return 0;
    }
  f[0] = n;
  getroot(1, 0);
  vector<int> ans;
  int t;
  if (t = check(root)) ans.push_back(t);
  for (int i = 0; i < (int)G[root].size(); ++i) {
    int v = G[root][i];
    if (t = check(v)) ans.push_back(t);
    for (int j = 0; j < (int)G[v].size(); ++j) {
      if (G[v][j] != root) {
        if (t = check(G[v][j])) ans.push_back(t);
      }
    }
  }
  cout << ans.size() << endl;
  if (!ans.size()) return 0;
  sort(ans.begin(), ans.end());
  ans.erase(unique(ans.begin(), ans.end()), ans.end());
  for (int i = 0; i < (int)ans.size(); ++i) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
