#include <bits/stdc++.h>
const int MAXN = (1 << 17) + 5;
using namespace std;
inline void chk_max(int &a, int b) {
  if (a < b) a = b;
}
struct Edge {
  int next, to;
} e[MAXN * 2];
int head[MAXN], deg[MAXN], etot = 0;
inline void add(int u, int v) {
  e[++etot] = (Edge){head[u], v};
  head[u] = etot;
  ++deg[v];
}
int n, m, dep[MAXN], fa[MAXN];
inline void dfs(int u, int pre) {
  fa[u] = pre;
  for (int i = head[u]; i; i = e[i].next) {
    int v = e[i].to;
    if (v == pre) continue;
    dep[v] = dep[u] + 1;
    dfs(v, u);
  }
}
vector<int> chs;
void gao_dia(void) {
  dfs(1, 0);
  int u = 1;
  for (int i = 1; i <= m; ++i)
    if (dep[i] > dep[u]) u = i;
  dep[u] = 0;
  dfs(u, 0);
  int v = u;
  for (int i = 1; i <= m; ++i)
    if (dep[i] > dep[v]) v = i;
  int md = dep[v] >> 1;
  for (int i = v; i; i = fa[i])
    if (dep[i] >= md && dep[i] <= md + 1) chs.push_back(i);
}
int type[MAXN], h[MAXN];
vector<int> ful, spe;
inline bool cmp(int x, int y) { return h[x] < h[y]; }
int del;
inline void dfs2(int u, int fa) {
  type[u] = h[u] = 0;
  int son = deg[u] - (fa != 0);
  if (!son) {
    type[u] = 1;
    return;
  }
  for (int i = head[u]; i; i = e[i].next) {
    int v = e[i].to;
    if (v == fa) continue;
    dfs2(v, u);
    if (!type[v]) return;
  }
  ful.clear();
  spe.clear();
  for (int i = head[u]; i; i = e[i].next) {
    int v = e[i].to;
    if (v == fa) continue;
    if (type[v] == 1)
      ful.push_back(v);
    else {
      if (spe.size()) return;
      spe.push_back(v);
    }
    chk_max(h[u], h[v] + 1);
  }
  if (son == 1) {
    if (ful.size() && !h[ful[0]]) del = u, type[u] = 2;
    return;
  }
  if (son == 2) {
    if (ful.size() == 2) {
      if (h[ful[0]] == h[ful[1]]) type[u] = 1;
      return;
    }
    if (h[ful[0]] == h[spe[0]]) type[u] = 2;
    return;
  }
  sort(ful.begin(), ful.end(), cmp);
  if (ful.size() == 3 && h[ful[0]] == h[ful[2]] - 1 &&
      h[ful[1]] == h[ful[2]] - 1)
    del = u, type[u] = 2;
  return;
}
vector<int> fin;
int main(void) {
  scanf("%d", &n);
  m = (1 << n) - 2;
  for (int i = 1; i < m; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    add(u, v);
    add(v, u);
  }
  for (int i = 1; i <= m; ++i)
    if (deg[i] > 4) {
      printf("0");
      return 0;
    }
  gao_dia();
  for (int i = 0; i < (int)chs.size(); ++i) {
    int u = chs[i];
    dfs2(u, 0);
    if (type[u] == 2) fin.push_back(del);
  }
  sort(fin.begin(), fin.end());
  printf("%d\n", (int)fin.size());
  for (int i = 0; i < (int)fin.size(); ++i) printf("%d ", fin[i]);
  return 0;
}
