#include <bits/stdc++.h>
using namespace std;
vector<int> a[1000005];
int vis[1000005], vis1[1000005], vis2[1000005];
int level[1000005], level1[1000005], level2[1000005];
int sz[1000005];
void init() {
  for (int i = 0; i < 1000005; i++) {
    vis[i] = 0;
    sz[i] = 0;
  }
}
void dfs(int n) {
  vis[n] = 1;
  for (int i = 0; i < a[n].size(); i++) {
    if (vis[a[n][i]] == 0) {
      level[a[n][i]] = level[n] + 1;
      dfs(a[n][i]);
    }
  }
}
void dfs1(int n) {
  vis1[n] = 1;
  for (int i = 0; i < a[n].size(); i++) {
    if (vis1[a[n][i]] == 0) {
      level1[a[n][i]] = level1[n] + 1;
      dfs1(a[n][i]);
    }
  }
}
void dfs2(int n) {
  vis2[n] = 1;
  for (int i = 0; i < a[n].size(); i++) {
    if (vis2[a[n][i]] == 0) {
      level2[a[n][i]] = level2[n] + 1;
      dfs2(a[n][i]);
    }
  }
}
vector<int> ans;
int isc[1000005];
int foo(int n) {
  vis[n] = 1;
  sz[n] = 1;
  int valid = 0;
  set<int> s;
  for (int i = 0; i < a[n].size(); i++) {
    if (vis[a[n][i]] == 0) {
      foo(a[n][i]);
      sz[n] += sz[a[n][i]];
      s.insert(sz[a[n][i]]);
    }
  }
  if (s.size() > 1) return isc[n] = 0;
  if (a[n].size() != 3 && a[n].size() != 1) return isc[n] = 0;
  return isc[n] = 1;
}
int aa = 0;
int check1(int n) {
  vis[n] = 1;
  vector<int> temp;
  for (int i = 0; i < a[n].size(); i++) {
    if (vis[a[n][i]] == 0) {
      temp.push_back(a[n][i]);
    }
  }
  if (temp.size() == 2) {
    if (sz[temp[0]] > sz[temp[1]]) {
      swap(temp[0], temp[1]);
    }
    if (check1(temp[0]) && isc[temp[1]]) {
      if (sz[temp[0]] != sz[temp[1]] && aa == 0) aa = n;
      return 1;
    } else
      return 0;
  } else if (temp.size() == 3) {
    if (isc[temp[0]] && isc[temp[1]] && isc[temp[2]]) {
      if (aa == 0) aa = n;
      return 1;
    }
    return 0;
  }
  if (aa == 0) aa = n;
  return 1;
}
void check(int n) {
  aa = 0;
  init();
  vis[n] = 1;
  int vaild = 1;
  if (a[n].size() > 3) return;
  for (int i = 0; i < a[n].size(); i++) {
    foo(a[n][i]);
  }
  for (int i = 0; i < 1000005; i++) vis[i] = 0;
  vis[n] = 1;
  int x = check1(n);
  if (x == 1) ans.push_back(aa);
}
int32_t main() {
  int n;
  cin >> n;
  int m = pow(2, n) - 3;
  int root = 0;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    root = u;
    a[u].push_back(v);
    a[v].push_back(u);
  }
  init();
  dfs(root);
  int max1 = 0;
  int maxn = pow(2, n);
  for (int i = 1; i <= maxn; i++) {
    if (level[i] > level[max1]) {
      max1 = i;
    }
  }
  dfs1(max1);
  int max2 = 0;
  for (int i = 1; i <= maxn; i++) {
    if (level1[i] > level1[max2]) {
      max2 = i;
    }
  }
  dfs2(max2);
  int req = level1[max2];
  req++;
  req /= 2;
  for (int i = 1; i <= maxn; i++) {
    if ((level1[i] + level2[i]) == level1[max2] &&
        abs(level1[i] - level2[i]) <= 1) {
      check(i);
    }
  }
  cout << ans.size() << endl;
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
