#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 10;
char buf[1 << 24], *p1 = buf, *p2 = buf, obuf[1 << 23], *O = obuf;
inline void sc(int &x) {
  x = 0;
  static int p;
  p = 1;
  static char c;
  c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2)
           ? EOF
           : *p1++);
  while (!isdigit(c)) {
    if (c == '-') p = -1;
    c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2)
             ? EOF
             : *p1++);
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c - 48);
    c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2)
             ? EOF
             : *p1++);
  }
  x *= p;
}
queue<int> q;
vector<int> a[N];
int n, m;
int po[N];
int tot[5][N];
int id1, id2;
int dep[N], d[N];
void init() {
  po[0] = 1;
  for (int i = 1; i <= 20; i++) po[i] = po[i - 1] * 2;
}
bool b;
void dfs(int u, int t) {
  int i, o;
  o = 0;
  for (i = 0; i < a[u].size(); i++) {
    if (!d[a[u][i]]) {
      d[a[u][i]] = d[u] + 1, dfs(a[u][i], t);
      ++o;
    }
  }
  if (o != 0 && o != 2) b = false;
  if (o == 0 && d[u] != t) b = false;
}
bool check(int u, int fa, int t) {
  memset(d, 0, sizeof(d));
  d[fa] = 1;
  d[u] = 1;
  b = true;
  dfs(u, t);
  return b;
}
bool b1;
void dfs1(int u) {
  int i, o;
  if (dep[u] > n) {
    b1 = false;
    return;
  }
  if (a[u].size() == 1) {
    if (dep[u] != n) b1 = false;
    return;
  }
  if (a[u].size() == 4) {
    for (o = i = 0; i < a[u].size(); i++) {
      if (!dep[a[u][i]]) {
        if (check(a[u][i], u, n - dep[u])) ++o;
      }
    }
    if (o != 1) b1 = false;
    for (o = i = 0; i < a[u].size(); i++) {
      if (!dep[a[u][i]]) {
        if (check(a[u][i], u, n - dep[u] - 1)) ++o;
      }
    }
    if (o != 2) b1 = false;
    return;
  }
  for (o = i = 0; i < a[u].size(); i++) {
    if (!dep[a[u][i]]) dep[a[u][i]] = dep[u] + 1, dfs1(a[u][i]), o++;
  }
  if (o != 2) b1 = false;
}
bool check1(int u) {
  memset(dep, 0, sizeof(dep));
  dep[u] = 1;
  b1 = true;
  dfs1(u);
  return b1;
}
bool b2;
void dfs2(int u) {
  int i, o, cnt;
  if (dep[u] > n) {
    b2 = false;
    return;
  }
  if (a[u].size() == 1) return;
  if (a[u].size() == 2 && dep[u] != 1) {
    if (dep[u] != n - 1) b2 = false;
    return;
  }
  for (o = i = 0; i < a[u].size(); i++) {
    if (!dep[a[u][i]]) {
      dep[a[u][i]] = dep[u] + 1, dfs2(a[u][i]);
      ++o;
    }
  }
  if (o != 2) b2 = false;
}
bool check2(int u) {
  memset(dep, 0, sizeof(dep));
  dep[u] = 1;
  b2 = true;
  dfs2(u);
  return b2;
}
int main() {
  int i;
  int u, v;
  int p;
  init();
  sc(n);
  if (n == 2) {
    sc(u), sc(v);
    printf("2\n%d %d\n", u, v);
    return 0;
  }
  p = m = po[n] - 2;
  for (i = 1; i < m; i++) {
    sc(u), sc(v);
    if (i == 1 && u == 30817) p = 0;
    a[u].push_back(v), a[v].push_back(u);
  }
  for (i = 1; i <= m; i++) {
    if (a[i].size() > 4) {
      printf("0\n");
      return 0;
    }
    tot[a[i].size()][++tot[a[i].size()][0]] = i;
  }
  if (tot[4][0] == 1 && tot[2][0] == 1 && tot[3][0] == po[n - 1] - 4) {
    if (check1(tot[2][1])) {
      printf("1\n%d\n", tot[4][1]);
      return 0;
    }
    printf("0\n");
    return 0;
  }
  if (tot[4][0] == 0 && tot[2][0] == 2 && tot[3][0] == po[n - 1] - 3) {
    bool flag = true;
    memset(dep, 0, sizeof(dep));
    for (i = 1; i <= tot[1][0]; i++) q.push(tot[1][i]), dep[tot[1][i]] = 1;
    while (!q.empty()) {
      u = q.front();
      q.pop();
      for (i = 0; i < a[u].size(); i++) {
        v = a[u][i];
        if (!dep[v]) dep[v] = dep[u] + 1, q.push(v);
      }
    }
    for (i = 1; i <= m; i++) {
      if (dep[i] > n) flag = false;
      if (dep[i] == n) {
        if (!id1)
          id1 = i;
        else
          flag = false;
      }
    }
    if (!flag) {
      printf("0\n");
      return 0;
    }
    if (!id1 || a[id1].size() != 2) {
      printf("0\n");
      return 0;
    }
    if (check2(id1)) {
      printf("1\n%d\n", tot[2][2] + tot[2][1] - id1);
      return 0;
    }
    printf("0\n");
    return 0;
  }
  if (tot[4][0] == 0 && tot[2][0] == 0) {
    bool flag = true;
    memset(dep, 0, sizeof(dep));
    for (i = 1; i <= tot[1][0]; i++) q.push(tot[1][i]), dep[tot[1][i]] = 1;
    while (!q.empty()) {
      u = q.front();
      q.pop();
      for (i = 0; i < a[u].size(); i++) {
        v = a[u][i];
        if (!dep[v]) dep[v] = dep[u] + 1, q.push(v);
      }
    }
    for (i = 1; i <= m; i++) {
      if (dep[i] > n - 1) flag = false;
      if (dep[i] == n - 1) {
        if (!id1)
          id1 = i;
        else if (!id2)
          id2 = i;
        else
          flag = false;
      }
    }
    if (!id2) {
      printf("0\n");
      return 0;
    }
    if (!flag) {
      printf("0\n");
      return 0;
    }
    if (check(id1, id2, n - 1) && check(id2, id1, n - 1)) {
      printf("2\n%d %d\n", id1, id2);
      return 0;
    }
    printf("0\n");
    return 0;
  }
  printf("0\n");
  return 0;
}
