#include <bits/stdc++.h>
using namespace std;
int n, sz[1 << 18], a, b, z;
vector<int> e[1 << 18], A, B, ans;
bool tp, use[1 << 18];
void dfs(int u, int par) {
  sz[u] = 1;
  for (int v : e[u])
    if (v != par) {
      dfs(v, u), sz[u] += sz[v];
      if (!tp and sz[v] * 2 + 2 == 1 << n) B = vector<int>{u, v};
    }
}
bool CK(int x, int d) {
  int ch = 0;
  use[x] = 1;
  for (int y : e[x])
    if (!use[y]) {
      if (!CK(y, d - 1)) return 0;
      ++ch;
    }
  return d > 1 ? ch == 2 : ch == 0;
}
bool cmp(int x, int y) { return sz[x] > sz[y]; }
void ck(int x, int d) {
  auto T = e[x];
  tp = 1, dfs(x, 0);
  sort(e[x].begin(), e[x].end(), cmp), e[z] = {x};
  for (; d--;) e[z].push_back(e[x].back()), e[x].pop_back();
  e[x].push_back(z);
  if ((memset(use, 0, sizeof(use)), CK(B[0], n)) or
      (memset(use, 0, sizeof(use)), CK(B[1], n)))
    ans.push_back(x);
  e[x] = T;
}
inline void O() {
  printf("%d\n", ans.size());
  sort(ans.begin(), ans.end());
  for (int x : ans) printf("%d ", x);
  puts("");
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i + 3 < 1 << n; ++i)
    scanf("%d%d", &a, &b), e[a].push_back(b), e[b].push_back(a);
  for (int i = 1; i < 1 << n; ++i)
    if (e[i].empty()) z = i;
  if (n == 2) {
    return printf("2\n%d %d\n", min(a, b), max(a, b)), 0;
  }
  tp = 0;
  dfs(e[1].empty() ? 2 : 1, 0);
  if (B.empty()) {
    return puts("0") * 0;
  }
  for (int i = 1; i < 1 << n; ++i) {
    if (e[i].size() == 4) {
      ck(i, 2);
      O();
      return 0;
    }
    if (e[i].size() == 2) A.push_back(i);
  }
  if (A.size() == 2)
    for (int x : A)
      if (x != B[0] and x != B[1]) {
        ck(x, 0);
        O();
        return 0;
      }
  ck(B[0], 2);
  ck(B[1], 2);
  O();
  return 0;
}
