#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int inf = 1000 * 1000 * 1000;
const int mod = 1000 * 1000 * 1000 + 7;
int n;
vector<int> g[N];
queue<int> q;
int depth[N];
void dfs(int v, int p) {
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    dfs(to, v);
    depth[v] = max(depth[v], depth[to] + 1);
  }
}
int H[N];
int mx, h;
void solve(int v, int p, int r) {
  mx = max(mx, r);
  ++H[r];
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    solve(to, v, r + 1);
  }
}
bool check(int v) {
  solve(v, -1, 1);
  if (mx != h) return false;
  for (int i = 1; i <= mx; i++) {
    if (H[i] != (1 << (i - 1))) return false;
  }
  return true;
}
int main() {
  mt19937 myrand(chrono::steady_clock::now().time_since_epoch().count());
  cin >> n;
  h = n;
  n = (1 << n) - 2;
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  if (n == 2) {
    cout << 2 << endl;
    cout << 1 << " " << 2 << endl;
    return 0;
  }
  int cnt = 0;
  int one = 0;
  int two = 0;
  for (int i = 1; i <= n; i++) {
    if ((int)g[i].size() > 4) {
      cout << 0 << endl;
      return 0;
    }
    if ((int)g[i].size() == 4) {
      ++cnt;
    }
    if ((int)g[i].size() == 2) {
      ++two;
    }
    if ((int)g[i].size() == 1) {
      ++one;
    }
  }
  if (cnt > 1 || two > 2) {
    cout << 0 << endl;
    return 0;
  }
  if (one != (1 << (h - 1)) && one != (1 << (h - 1)) - 1) {
    cout << 0 << endl;
    return 0;
  }
  if (cnt == 0) {
    if (one == (1 << (h - 1))) {
      if (two != 0) {
        cout << 0 << endl;
        return 0;
      }
      for (int i = 1; i <= n; i++) {
        if ((int)g[i].size() == 1) {
          depth[i] = 1;
          q.push(i);
        }
      }
      while (!q.empty()) {
        int v = q.front();
        q.pop();
        if (depth[v] == h - 1) continue;
        int z = 0;
        for (int i = 0; i < (int)g[v].size(); i++) {
          int to = g[v][i];
          if (depth[to] == 0) {
            depth[to] = depth[v] + 1;
            q.push(to);
          }
          if (depth[to] == depth[v] - 1) ++z;
        }
        if (depth[v] == 1 && z == 0 || depth[v] > 1 && z == 2) {
        } else {
          cout << 0 << endl;
          return 0;
        }
      }
      vector<int> answ;
      for (int i = 1; i <= n; i++) {
        if (depth[i] == h - 1) {
          answ.push_back(i);
        }
      }
      if ((int)answ.size() != 2) {
        cout << 0 << endl;
        return 0;
      }
      int v = answ[0];
      for (int i = 0; i < (int)g[v].size(); i++) {
        if (g[v][i] == answ[1]) {
          cout << 2 << endl;
          cout << answ[0] << " " << answ[1] << endl;
          return 0;
        }
      }
      cout << 0 << endl;
      return 0;
    }
    if (two != 2) {
      cout << 0 << endl;
      return 0;
    }
    int root, res = 0;
    for (int i = 1; i <= n; i++) {
      if ((int)g[i].size() == 2) {
        for (int j = 0; j < (int)g[i].size(); j++) {
          int v = g[i][j];
          if ((int)g[v].size() == 1) {
            res = i;
            break;
          }
        }
        if (res != 0) break;
      }
    }
    if (res == 0) {
      cout << 0 << endl;
      return 0;
    }
    for (int i = 1; i <= n; i++) {
      if ((int)g[i].size() == 2) {
        if (i != res) {
          root = i;
          break;
        }
      }
    }
    g[res].push_back(n + 1);
    g[n + 1].push_back(res);
    if (check(root)) {
      cout << 1 << endl;
      cout << res << endl;
    } else
      cout << 0 << endl;
    return 0;
  }
  if (one != (1 << (h - 1))) {
    cout << 0 << endl;
    return 0;
  }
  int root, res;
  for (int i = 1; i <= n; i++) {
    if ((int)g[i].size() == 4) res = i;
    if ((int)g[i].size() == 2) root = i;
  }
  dfs(root, -1);
  int l1 = 0;
  vector<int> mas;
  for (int i = 0; i < (int)g[res].size(); i++) {
    int v = g[res][i];
    if (depth[v] == depth[res] + 1) continue;
    if (depth[v] == depth[res] - 1) ++l1;
    if (depth[v] == depth[res] - 2) mas.push_back(v);
  }
  if ((int)mas.size() != 2 || l1 != 1) {
    cout << 0 << endl;
    return 0;
  }
  g[n + 1].push_back(mas[0]);
  g[n + 1].push_back(mas[1]);
  g[n + 1].push_back(res);
  g[res].push_back(n + 1);
  g[mas[0]].push_back(n + 1);
  g[mas[1]].push_back(n + 1);
  for (int i = 0; i < (int)g[res].size(); i++) {
    if (g[res][i] == mas[0]) {
      g[res].erase(g[res].begin() + i);
      break;
    }
  }
  for (int i = 0; i < (int)g[res].size(); i++) {
    if (g[res][i] == mas[1]) {
      g[res].erase(g[res].begin() + i);
      break;
    }
  }
  for (int i = 0; i < (int)g[mas[0]].size(); i++) {
    if (g[mas[0]][i] == res) {
      g[mas[0]].erase(g[mas[0]].begin() + i);
      break;
    }
  }
  for (int i = 0; i < (int)g[mas[1]].size(); i++) {
    if (g[mas[1]][i] == res) {
      g[mas[1]].erase(g[mas[1]].begin() + i);
      break;
    }
  }
  if (check(root)) {
    cout << 1 << endl;
    cout << res << endl;
  } else
    cout << 0 << endl;
  return 0;
}
