#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (auto i = begin(v); i != end(v); i++)
    os << *i << (i == end(v) - 1 ? "" : " ");
  return os;
}
template <class T>
istream& operator>>(istream& is, vector<T>& v) {
  for (auto i = begin(v); i != end(v); i++) is >> *i;
  return is;
}
vector<vector<int>> g;
vector<int> visited;
vector<int> bad_parents;
bool total_stop = false;
int full_bt_depth(int i) {
  visited[i] = true;
  vector<int> sizes;
  for (int u : g[i]) {
    if (visited[u]) continue;
    sizes.push_back(full_bt_depth(u));
  }
  if (sizes.size() == 0) return 1;
  if (sizes.size() == 1) {
    if (sizes[0] != 1) total_stop = true;
    bad_parents.push_back(i);
    return -1;
  }
  if (sizes.size() == 2) {
    if (sizes[0] == sizes[1] && sizes[0] != -1) {
      return sizes[0] + 1;
    }
    if (sizes[0] == -1 && sizes[1] == -1) total_stop = true;
    return -1;
  }
  if (sizes.size() == 3) {
    sort((sizes).begin(), (sizes).end());
    if (sizes[0] == sizes[1] && (sizes[1] + 1) == sizes[2]) {
      bad_parents.push_back(i);
      return -1;
    }
  }
  total_stop = true;
  return -1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  if (n == 2) {
    cout << "2\n 1 2";
    return 0;
  }
  int n_vtx = (1 << n) - 1;
  g.resize(n_vtx);
  visited.resize(n_vtx);
  int first_a = -1, first_b = -1;
  for (int i = 0; i < (n_vtx - 2); i++) {
    int a, b;
    cin >> a >> b;
    if (first_a == -1) first_a = a;
    if (first_b == -1) first_b = b;
    a--, b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  queue<int> leaves;
  for (int i = 0; i < n_vtx; i++) {
    if (g[i].size() == 1) {
      leaves.push(i);
      visited[i] = true;
    }
  }
  vector<int> last_row;
  while (leaves.size() > 0) {
    int sz = leaves.size();
    last_row.clear();
    while (sz-- > 0) {
      int q = leaves.front();
      leaves.pop();
      last_row.push_back(q);
      for (int u : g[q]) {
        visited[u]++;
        if (visited[u] + 1 == g[u].size()) {
          leaves.push(u);
        }
      }
    }
  }
  for (int x : last_row) {
    visited.assign(visited.size(), 0);
    full_bt_depth(x);
  }
  if (total_stop || bad_parents.size() == 0) {
    cout << 0;
    return 0;
  } else {
    sort((bad_parents).begin(), (bad_parents).end());
    cout << bad_parents.size() << "\n";
    for (int u : bad_parents) cout << u + 1 << " ";
  }
  return 0;
}
