#include <bits/stdc++.h>
using namespace std;
int a[(1 << 19)], b[(1 << 19)], parent[(1 << 19)], path[(1 << 19)],
    depth[(1 << 19)], sz[(1 << 19)];
vector<int> adj[(1 << 19)];
bool isBan[(1 << 19)];
void dfs(int &R, int &maxNode, int node, int par, int d) {
  if (R < d) {
    R = d;
    maxNode = node;
  }
  depth[node] = d;
  sz[node] = 1;
  for (int eid : adj[node]) {
    int ch = a[eid] ^ b[eid] ^ node;
    if (ch != par) {
      parent[ch] = node;
      dfs(R, maxNode, ch, node, d + 1);
      sz[node] += sz[ch];
    }
  }
}
int vis[(1 << 19)];
bool isFullbinary(int root, int m) {
  queue<pair<int, int> > q;
  q.push({root, 0});
  vector<int> num(m, 0);
  assert(num.size() == m);
  static int color = 0;
  ++color;
  vis[root] = color;
  while (!q.empty()) {
    int node = q.front().first, dep = q.front().second;
    q.pop();
    if (dep >= m) {
      return false;
    }
    ++num[dep];
    int g = 0;
    for (int eid : adj[node]) {
      if (isBan[eid]) {
        continue;
      }
      int ch = a[eid] ^ b[eid] ^ node;
      if (vis[ch] != color) {
        ++g;
        vis[ch] = color;
        q.push({ch, dep + 1});
      }
    }
    if (g > 2) {
      return false;
    }
  }
  for (int i = 0; i < m; ++i) {
    if (num[i] != (1 << i)) {
      return false;
    }
  }
  return true;
}
void solve() {
  int m;
  scanf("%d ", &m);
  int n = (1 << m) - 1;
  for (int i = 0; i < n - 2; ++i) {
    scanf("%d %d ", &a[i], &b[i]);
    adj[a[i]].push_back(i);
    adj[b[i]].push_back(i);
  }
  int x = 1, R = 0;
  dfs(R, x, 1, 0, 0);
  int y = x;
  R = 0;
  dfs(R, y, y, 0, 0);
  if (R > m * 2 - 2 || R < m * 2 - 3) {
    printf("0\n");
    return;
  }
  int pos = 0;
  while (true) {
    path[pos++] = y;
    if (y == x) {
      break;
    }
    y = parent[y];
  }
  if (R == m * 2 - 2) {
    int root = path[R / 2];
    dfs(R, y, root, 0, 0);
    int numInvalid = 0, p = -1;
    for (int i = 1; i < n; ++i) {
      if (i != root) {
        if (adj[i].size() == 2 || adj[i].size() > 3) {
          ++numInvalid;
          p = i;
        }
      }
    }
    if (numInvalid != 1) {
      printf("0\n");
      return;
    }
    int curEdge = n - 2, edge = n - 2;
    for (int i = 0; i < curEdge; ++i) {
      if (a[i] == p || b[i] == p) {
        if (a[i] != p) {
          swap(a[i], b[i]);
        }
        if (depth[b[i]] > depth[p]) {
          int g = m - depth[p] - 1;
          if ((1 << g) - 1 != sz[b[i]]) {
            a[edge] = b[i];
            b[edge++] = n;
            isBan[i] = true;
          }
        }
      }
    }
    a[edge] = p;
    b[edge++] = n;
    for (int i = curEdge; i < edge; ++i) {
      adj[a[i]].push_back(i);
      adj[b[i]].push_back(i);
    }
    if (isFullbinary(root, m)) {
      printf("1\n%d", p);
    } else {
      printf("0\n");
    }
  } else {
    int u = path[R / 2], v = path[R / 2 + 1];
    if (u > v) {
      swap(u, v);
    }
    for (int i = 0; i < n - 2; ++i) {
      if (a[i] > b[i]) {
        swap(a[i], b[i]);
      }
      if (a[i] == u && b[i] == v) {
        isBan[i] = true;
        break;
      }
    }
    if (isFullbinary(u, m - 1) && isFullbinary(v, m - 1)) {
      printf("2\n%d %d\n", u, v);
    } else {
      printf("0\n");
    }
  }
}
int main() {
  solve();
  return 0;
}
