#include <bits/stdc++.h>
using namespace std;
const int nm = 132000;
int n;
vector<int> adj[nm];
int d[nm], d2[nm];
int nchild[nm], ndec[nm];
int cnt[nm];
void dfs(int i, int p, int d[]) {
  nchild[i] = ndec[i] = 0;
  for (int j : adj[i]) {
    if (j != p) {
      nchild[i]++;
      d[j] = d[i] + 1;
      dfs(j, i, d);
      ndec[i] += ndec[j] + 1;
    }
  }
}
int check(int r) {
  d[r] = 0;
  dfs(r, -1, d);
  memset(cnt, 0, sizeof(cnt));
  for (int i = 1; i <= (1 << n) - 2; ++i) {
    cnt[nchild[i]]++;
  }
  if (cnt[1] + cnt[3] != 1) return 0;
  if (cnt[1] == 1) {
    if (cnt[2] != (1 << (n - 1)) - 2) return 0;
    for (int i = 1; i <= (1 << n) - 2; ++i)
      if (nchild[i] == 1) {
        return i;
      }
    return 0;
  } else {
    if (cnt[2] != (1 << (n - 1)) - 3) return 0;
  }
  for (int i = 1; i <= (1 << n) - 2; ++i)
    if (nchild[i] == 3) {
      vector<int> x;
      for (int j : adj[i]) {
        if (d[j] > d[i]) {
          x.push_back(ndec[j]);
        }
      }
      sort(x.begin(), x.end());
      if (x[0] * 2 + 2 == x[2] && x[1] * 2 + 2 == x[2]) {
        return i;
      }
      return 0;
    }
  return 0;
}
int main() {
  scanf("%d", &n);
  int u0;
  for (int i = 1; i <= (1 << n) - 3; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    u0 = u;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  if (n == 2) {
    printf("2\n1 2\n");
    return 0;
  }
  dfs(u0, -1, d);
  int v0 = u0;
  for (int i = 1; i <= (1 << n) - 2; ++i) {
    if (d[i] > d[v0]) v0 = i;
  }
  dfs(v0, -1, d2);
  u0 = v0;
  for (int i = 1; i <= (1 << n) - 2; ++i) {
    if (d2[i] > d2[u0]) u0 = i;
  }
  d[u0] = 0;
  dfs(u0, -1, d);
  vector<int> roots;
  for (int i = 1; i <= (1 << n) - 2; ++i) {
    if (d[i] + d2[i] == d2[u0] && abs(d[i] - d2[i]) <= 1) {
      roots.push_back(i);
    }
  }
  vector<int> res;
  for (int r : roots) {
    int tmp = check(r);
    if (tmp) {
      res.push_back(tmp);
    }
  }
  printf("%d\n", res.size());
  for (int r : res) {
    printf("%d ", r);
  }
}
