#include <bits/stdc++.h>
using namespace std;
const int maxn = 1 << 18;
int n, st, nn, root, dist[maxn], fa[maxn], dep[maxn];
vector<int> ans, G[maxn];
void dfs(int u, int f) {
  fa[u] = f;
  if (dist[u] > dist[st]) st = u;
  for (int v : G[u])
    if (v != f) {
      dist[v] = dist[u] + 1;
      dfs(v, u);
    }
}
int fullBinaryTree(int u, int f) {
  if (G[u].size() == 1) return 1;
  int ret = 0, r = 0;
  if (G[u].size() == 3) {
    for (int v : G[u])
      if (v != f) {
        r = fullBinaryTree(v, u);
        if (!r) return 0;
        ret += r;
      }
    if (ret != r + r) return 0;
    return ret + 1;
  }
  return 0;
}
int cnt, sz[10];
int check(int u, int f) {
  dep[u] = dep[f] + 1;
  if (dep[u] > n) return 0;
  if ((int)G[u].size() == 1) return dep[u] == n;
  if ((int)G[u].size() >= 5) return 0;
  if ((int)G[u].size() == 2 && f) {
    if (dep[u] != n - 1) return 0;
    if (ans.size()) return 0;
    ans.push_back(u);
    return 1;
  }
  if ((int)G[u].size() == 4) {
    if (cnt || ans.size()) return 0;
    for (int v : G[u])
      if (v != f) {
        sz[++cnt] = fullBinaryTree(v, u);
        if (sz[cnt] == 0) return 0;
      }
    sort(sz + 1, sz + cnt + 1);
    if (sz[1] * 2 + 1 != sz[3]) return 0;
    if (sz[3] != (1 << (n - dep[u])) - 1) return 0;
    ans.push_back(u);
  } else {
    for (int v : G[u])
      if (v != f) {
        if (!check(v, u)) return 0;
      }
  }
  return 1;
}
int main() {
  scanf("%d", &n);
  nn = (1 << n) - 2;
  for (int i = 1, u, v; i < nn; ++i) {
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  dfs(1, 0);
  dist[st] = 0;
  dfs(st, 0);
  int x = st;
  while (x) {
    if (dist[x] == n - 1) root = x;
    x = fa[x];
  }
  if (dist[st] == n * 2 - 2) {
    dep[0] = 0;
    if ((int)G[root].size() != 2 || !check(root, 0)) return printf("0\n"), 0;
    printf("1\n%d\n", ans[0]);
  } else if (dist[st] == n * 2 - 3) {
    if (fullBinaryTree(root, fa[root]) && fullBinaryTree(fa[root], root))
      printf("2\n%d %d\n", min(root, fa[root]), max(root, fa[root]));
    else
      printf("0\n");
  } else
    printf("0\n");
  return 0;
}
