#include <bits/stdc++.h>
const long long MAXN = 4e5 + 10;
long long get_int() {
  long long x = 0, y = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') y = -1, ch = getchar();
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * y;
}
long long nodes[MAXN], tmpNodes[MAXN], deep[MAXN], tmpTot, tot;
long long n, nowP, nowDis, nodeChanged = -1;
long long qPow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans *= a;
    a *= a;
    b >>= 1;
  }
  return ans;
}
class Edge {
 public:
  long long next, to;
} edges[MAXN];
long long head[MAXN], eNum;
void addEdge(long long from, long long to) {
  edges[eNum] = (Edge){head[from], to};
  head[from] = eNum++;
}
void dfs(long long now, long long pre = -1, long long dis = 0) {
  if (dis > nowDis) {
    nowDis = dis;
    if (nowDis / 2 == n - 1 || nowDis / 2 == n - 2) {
      for (long long i = 0; i < tmpTot; i++) nodes[i] = tmpNodes[i];
      tot = tmpTot;
    }
    nowP = now;
  }
  for (long long i = head[now]; i != -1; i = edges[i].next) {
    long long to = edges[i].to;
    if (to == pre) continue;
    tmpNodes[tmpTot++] = to;
    dfs(to, now, dis + 1);
    tmpTot--;
  }
}
long long checkS1(long long now, long long pre) {
  long long cnt = -1;
  for (long long i = head[now]; i != -1; i = edges[i].next) {
    cnt++;
  }
  if (cnt != 2 && cnt != 0) {
    std::cout << "0";
    exit(0);
  }
  if (cnt == 0) {
    return 1;
  }
  long long prev = -1;
  for (long long i = head[now]; i != -1; i = edges[i].next) {
    long long to = edges[i].to;
    if (to == pre) continue;
    long long height = checkS1(to, now);
    if (prev == -1)
      prev = height;
    else if (prev != height) {
      std::cout << "0";
      exit(0);
    }
  }
  return prev + 1;
}
void checkSubtree(long long now, long long pre) {
  long long a = 0, b = 0;
  for (long long i = head[now]; i != -1; i = edges[i].next) {
    long long to = edges[i].to;
    if (to == pre) continue;
    long long tmp = deep[now] + checkS1(to, now);
    if (tmp != n - 1 && tmp != n) {
      std::cout << "0";
      exit(0);
    }
    if (tmp == n - 1) a++;
    if (tmp == n) b++;
  }
  if (a != 2 || b != 1) {
    std::cout << "0";
    exit(0);
  }
}
void check(long long now, long long pre = -1) {
  long long cnt = 0;
  for (long long i = head[now]; i != -1; i = edges[i].next) {
    cnt++;
  }
  if (pre == -1) cnt++;
  if (cnt == 1 && deep[now] != n && deep[now] != n - 1) {
    std::cout << "0";
    exit(0);
  }
  if (cnt == 2) {
    if (nodeChanged != -1) {
      std::cout << "0";
      exit(0);
    }
    nodeChanged = now + 1;
    for (long long i = head[now]; i != -1; i = edges[i].next) {
      long long to = edges[i].to;
      if (to == pre) continue;
      long long cnt1 = 0;
      for (long long j = head[to]; j != -1; j = edges[j].next) cnt1++;
      if (cnt1 != 1) {
        std::cout << "0";
        exit(0);
      }
    }
  }
  if (cnt == 4) {
    if (nodeChanged != -1) {
      std::cout << "0";
      exit(0);
    }
    nodeChanged = now + 1;
    checkSubtree(now, pre);
  }
  for (long long i = head[now]; i != -1; i = edges[i].next) {
    long long to = edges[i].to;
    if (to == pre) continue;
    check(to, now);
  }
}
void getDeep(long long now, long long pre = -1) {
  for (long long i = head[now]; i != -1; i = edges[i].next) {
    long long to = edges[i].to;
    if (to == pre) continue;
    deep[to] = deep[now] + 1;
    getDeep(to, now);
  }
}
signed main() {
  memset(head, -1, sizeof(head));
  n = get_int();
  long long m = qPow(2, n) - 3;
  for (long long i = 0; i < m; i++) {
    long long from = get_int() - 1, to = get_int() - 1;
    addEdge(from, to);
    addEdge(to, from);
  }
  dfs(0);
  nowDis = 0;
  tmpNodes[0] = nowP;
  tmpTot = 1;
  dfs(nowP);
  nowDis = tot;
  if (nowDis % 2 == 0) {
    nowDis /= 2;
    if (nowDis == n - 1) {
      deep[nodes[tot / 2 - 1]] = 1;
      getDeep(nodes[tot / 2 - 1]);
      check(nodes[tot / 2 - 1]);
      nodeChanged = -1;
      deep[nodes[tot / 2]] = 1;
      getDeep(nodes[tot / 2]);
      check(nodes[tot / 2]);
      if (nodes[tot / 2 - 1] > nodes[tot / 2]) {
        std::cout << "2" << std::endl;
        std::cout << nodes[tot / 2] + 1 << ' ' << nodes[tot / 2 - 1] + 1;
      } else {
        std::cout << "2" << std::endl;
        std::cout << nodes[tot / 2 - 1] + 1 << ' ' << nodes[tot / 2] + 1;
      }
    } else {
      std::cout << "0" << std::endl;
    }
  } else {
    long long root = nodes[tot / 2];
    deep[root] = 1;
    getDeep(root);
    check(root);
    if (nodeChanged == -1) {
      std::cout << "0";
      exit(0);
    }
    std::cout << 1 << std::endl << nodeChanged;
  }
  return 0;
}
