#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAX_N = (1 << 17) + 5;
int n;
int H;
vector<int> G[MAX_N + 1];
int d[MAX_N + 1];
int par[MAX_N + 1];
void dfs(int v, int t) {
  d[v] = t;
  for (int i = 0; i < G[v].size(); i++) {
    int u = G[v][i];
    if (u == par[v]) continue;
    par[u] = v;
    dfs(u, t + 1);
  }
}
int findr() {
  par[1] = 0;
  dfs(1, 0);
  int v = 1;
  for (int i = 2; i <= n; i++)
    if (d[i] > d[v]) v = i;
  par[v] = 0;
  dfs(v, 0);
  v = 1;
  for (int i = 2; i <= n; i++)
    if (d[i] > d[v]) v = i;
  int k = d[v] / 2;
  while (k--) v = par[v];
  return v;
}
void dfs2(int v, int p, int t) {
  d[v] = t;
  for (int i = 0; i < G[v].size(); i++) {
    int u = G[v][i];
    if (u == p) continue;
    dfs2(u, v, t + 1);
  }
}
void get1() {
  int v = findr();
  int x = v, y = par[v];
  if (x > y) swap(x, y);
  dfs2(x, y, 0);
  dfs2(y, x, 0);
  int k = -1;
  for (int i = 1; i <= n; i++) {
    if (G[i].size() == 1) {
      if (k == -1)
        k = d[i];
      else if (k != d[i]) {
        printf("0\n");
        return;
      }
    }
  }
  printf("2\n");
  printf("%d %d\n", x, y);
}
void dfs3(int v, int p, int t, int s, int k) {
  if (p == s && v != k) t++;
  d[v] = t;
  for (int i = 0; i < G[v].size(); i++) {
    int u = G[v][i];
    if (u == p) continue;
    dfs3(u, v, t + 1, s, k);
  }
}
void get2() {
  int r = findr();
  int res;
  for (int i = 1; i <= n; i++)
    if (G[i].size() == 4) {
      res = i;
      break;
    }
  bool t;
  for (int i = 0; i < 4; i++) {
    dfs3(r, -1, 0, res, G[res][i]);
    t = true;
    int k = -1;
    for (int j = 1; j <= n; j++) {
      if (G[j].size() == 1) {
        if (k == -1)
          k = d[j];
        else if (k != d[j]) {
          t = false;
          break;
        }
      }
    }
    if (t) break;
  }
  if (t) {
    printf("1\n");
    printf("%d", res);
  } else
    printf("0\n");
}
void get3() {
  int x = 0, y = 0;
  for (int i = 1; i <= n; i++)
    if (G[i].size() == 2) {
      if (x == 0)
        x = i;
      else
        y = i;
    }
  par[x] = 0;
  dfs(x, 0);
  int k = -1;
  bool t = true;
  for (int i = 1; i <= n; i++) {
    if (G[i].size() == 1) {
      if (k == -1)
        k = d[i];
      else if (k != d[i]) {
        t = false;
        break;
      }
    }
  }
  if (t) {
    printf("1\n");
    printf("%d", y);
    return;
  }
  par[y] = 0;
  dfs(y, 0);
  k = -1;
  t = true;
  for (int i = 1; i <= n; i++) {
    if (G[i].size() == 1) {
      if (k == -1)
        k = d[i];
      else if (k != d[i]) {
        t = false;
        break;
      }
    }
  }
  if (t) {
    printf("1\n");
    printf("%d", x);
    return;
  }
  printf("0\n");
}
void solve() {
  int ans1 = 0, ans2 = 0, ans3 = 0, ans4 = 0;
  for (int i = 1; i <= n; i++) {
    if (G[i].size() == 1)
      ans1++;
    else if (G[i].size() == 2)
      ans2++;
    else if (G[i].size() == 3)
      ans3++;
    else if (G[i].size() == 4)
      ans4++;
  }
  if (ans1 + ans2 + ans3 + ans4 != n) {
    printf("0\n");
    return;
  }
  if (ans1 + ans3 == n && ans1 == (1 << (H - 1))) {
    get1();
    return;
  }
  if (ans1 == (1 << (H - 1)) && ans2 == 1 && ans4 == 1) {
    get2();
    return;
  }
  if (ans1 == (1 << (H - 1)) - 1 && ans2 == 2 && ans4 == 0) {
    get3();
    return;
  }
  printf("0\n");
}
int main() {
  scanf("%d", &n);
  H = n;
  n = (1 << n) - 2;
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  solve();
  return 0;
}
