#include <bits/stdc++.h>
using namespace std;
int m, n, vis[1 << 17], par[1 << 17], deg[1 << 17], sub[1 << 17];
vector<int> a[1 << 17];
int f = 0;
vector<int> bad;
void dfs(int node, int pa) {
  sub[node] = 1;
  par[node] = pa;
  deg[node] = 0;
  for (auto i : a[node]) {
    if (i != pa) {
      deg[node]++;
      dfs(i, node);
      sub[node] += sub[i];
    }
  }
  if (f == 0 and sub[node] & (sub[node] + 1)) {
    sub[node]++;
    bad.push_back(node);
    f = 1;
  }
}
void solve() {
  cin >> m;
  n = (1 << m) - 2;
  for (int i = 0; i < n - 1; i++) {
    int first, second;
    cin >> first >> second;
    a[first].push_back(second);
    a[second].push_back(first);
    deg[first]++;
    deg[second]++;
  }
  queue<int> q;
  for (int i = 1; i < n + 1; i++) {
    if (deg[i] == 1) {
      q.push(i);
    }
  }
  while (!q.empty()) {
    int d = q.front();
    q.pop();
    vis[d] = 1;
    for (auto i : a[d]) {
      if (vis[i] == 0) {
        par[d] = i;
        break;
      }
    }
    for (auto i : a[d]) {
      deg[i]--;
      if (vis[i] == 0 and deg[i] == 1) {
        q.push(i);
      }
    }
  }
  memset(deg, 0, sizeof deg);
  int root = -1;
  for (int i = 1; i < n + 1; i++) {
    if (par[i] == 0) {
      root = i;
    }
  }
  vector<int> candids;
  candids.push_back(root);
  for (auto i : a[root]) {
    candids.push_back(i);
  }
  if ((int)candids.size() > 5) {
    cout << 0 << '\n';
    return;
  }
  vector<int> ans;
  for (auto rot : candids) {
    bad.clear();
    f = 0;
    int yes = 1;
    dfs(rot, rot);
    par[rot] = 0;
    if ((int)bad.size() != 1 or (deg[bad[0]] != 3 && deg[bad[0]] != 1)) {
      yes = 0;
    }
    for (int i = 1; i < n + 1; i++) {
      if (par[i] and par[i] != bad[0] and 2 * sub[i] + 1 != sub[par[i]]) {
        yes = 0;
        break;
      }
      if (i == bad[0]) continue;
      if (deg[i] != 2 and deg[i] != 0) {
        yes = 0;
        break;
      }
    }
    if (yes) ans.push_back(bad[0]);
  }
  sort((ans).begin(), (ans).end());
  ans.resize(unique((ans).begin(), (ans).end()) - ans.begin());
  cout << (int)ans.size() << '\n';
  for (auto i : ans) cout << i << " ";
  cout << '\n';
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
