#include <bits/stdc++.h>
using namespace std;
const int maxn = ((1 << 17) + 5);
int N, M;
vector<int> adj[maxn];
int pp[maxn];
int d0, n0;
void dfs1(int n, int d, int p) {
  int m = adj[n].size();
  if (d0 < d) d0 = d, n0 = n;
  pp[n] = p;
  for (int i = 0; i < m; ++i)
    if (adj[n][i] != p) dfs1(adj[n][i], d + 1, n);
}
int fault;
int a0;
int dfs2(int n, int p) {
  int m = adj[n].size();
  if (m == 1) return 1;
  if (m > 4) {
    fault = 2;
    return 1;
  }
  int k = 0, l[3] = {
                 0,
             };
  for (int i = 0; i < m; ++i)
    if (adj[n][i] != p) l[k++] = dfs2(adj[n][i], n) + 1;
  if (m == 3) {
    if (l[0] != l[1]) fault = 2;
    return l[0];
  }
  if (m == 2) {
    fault = l[0] == 2 ? fault + 1 : 2;
    a0 = n;
    return l[0];
  }
  sort(l, l + k);
  if (l[0] == l[1] && l[1] + 1 == l[2]) {
    ++fault;
    a0 = n;
    return l[2];
  } else {
    fault = 2;
    return l[2];
  }
}
int main() {
  cin >> N;
  M = (1 << N) - 2;
  for (int i = 0; i < M - 1; ++i) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  d0 = 0;
  dfs1(1, 0, 0);
  d0 = 0;
  dfs1(n0, 0, 0);
  int m = d0 / 2;
  while (m--) n0 = pp[n0];
  fault = 0;
  if (d0 % 2) {
    int l1 = dfs2(n0, pp[n0]);
    int l2 = dfs2(pp[n0], n0);
    if (fault || l1 != l2 || l1 != N - 1)
      cout << "0" << endl;
    else
      cout << "2" << endl << min(n0, pp[n0]) << " " << max(n0, pp[n0]) << endl;
  } else {
    if (adj[n0].size() == 2) {
      int l1 = dfs2(adj[n0][0], n0);
      int l2 = dfs2(adj[n0][1], n0);
      if (fault == 1 && l1 == l2 && l1 == N - 1)
        cout << "1" << endl << a0 << endl;
      else
        cout << "0" << endl;
    } else {
      cout << "0" << endl;
    }
  }
  return 0;
}
