#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
vector<int> v[MAXN], g;
int s, t, ans1, ans2;
int dep[MAXN], num[MAXN];
void dfs(int u, int fa) {
  int len = v[u].size();
  for (int i = 0; i <= len - 1; i++) {
    int y = v[u][i];
    if (y == fa) continue;
    dep[y] = dep[u] + 1;
    dfs(y, u);
  }
}
void dfs1(int u, int fa) {
  if (ans1 != -1) return;
  g.push_back(u);
  if (u == t) {
    int len = g.size();
    if (len % 2 == 0) {
      ans1 = g[len / 2 - 1];
      ans2 = g[len / 2];
    } else {
      ans1 = g[len / 2];
    }
    return;
  }
  int len = v[u].size();
  for (int i = 0; i <= len - 1; i++) {
    int y = v[u][i];
    if (y == fa) continue;
    dfs1(y, u);
  }
  g.pop_back();
}
bool check1(int u, int fa) {
  if (fa == -1) memset(num, 0, sizeof(num));
  int len = v[u].size();
  vector<int> p;
  num[u] = 1;
  for (int i = 0; i <= len - 1; i++) {
    int y = v[u][i];
    if (y == fa || y == ans1 || y == ans2) continue;
    if (!check1(y, u)) return 0;
    num[u] += num[y];
    p.push_back(y);
  }
  len = p.size();
  if (len != 0 && len != 2) {
    return 0;
  }
  if (len == 2) {
    if (num[p[0]] != num[p[1]]) return 0;
  }
  return 1;
}
bool check2(int u, int fa) {
  if (fa == -1) memset(num, 0, sizeof(num));
  int len = v[u].size();
  vector<int> p;
  num[u] = 1;
  for (int i = 0; i <= len - 1; i++) {
    int y = v[u][i];
    if (y == fa) continue;
    if (!check2(y, u)) return 0;
    num[u] += num[y];
    p.push_back(y);
  }
  len = p.size();
  if (len != 0 && len != 2) {
    if (ans2 != -1) return 0;
    ans2 = u;
    num[u]++;
  }
  if (len == 2) {
    if (num[p[0]] != num[p[1]]) return 0;
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, a, b;
  while (cin >> n) {
    n = (1 << n) - 2;
    for (int i = 1; i <= n; i++) v[i].clear();
    dep[1] = 1;
    for (int i = 1; i <= n - 1; i++) {
      cin >> a >> b;
      v[a].push_back(b);
      v[b].push_back(a);
    }
    dfs(1, -1);
    s = 0;
    for (int i = 1; i <= n; i++)
      if (dep[i] > dep[s]) s = i;
    t = 0;
    dfs(s, -1);
    for (int i = 1; i <= n; i++)
      if (dep[i] > dep[t]) t = i;
    ans1 = ans2 = -1;
    g.clear();
    dfs1(s, -1);
    if (ans2 != -1) {
      if (check1(ans1, -1) && check1(ans2, -1)) {
        cout << 2 << endl;
        if (ans1 > ans2) swap(ans1, ans2);
        cout << ans1 << " " << ans2 << endl;
      } else {
        cout << 0 << endl;
      }
    } else {
      if (check2(ans1, -1)) {
        cout << 1 << endl;
        cout << ans2 << endl;
      } else {
        cout << 0 << endl;
      }
    }
  }
}
