#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int n, first, second, a, b, m, d[(1 << 17) + 5], p[(1 << 17) + 5];
vector<int> g[(1 << 17) + 5];
bool check(int nod, int par, int del, int hg) {
  int kids = g[nod].size();
  if (par) kids--;
  if (nod == del) {
    if (hg == 1)
      return 0;
    else if (hg == 2) {
      if (kids != 1) return 0;
      for (int i : g[nod]) {
        if (i != par) return check(i, nod, del, hg - 1);
      }
    } else {
      if (kids != 3) return 0;
      for (int i : g[nod]) {
        if (i != par) kids -= check(i, nod, del, hg - 1);
      }
      if (kids != 2) return 0;
      for (int i : g[nod]) {
        if (i != par) kids -= check(i, nod, del, hg - 2);
      }
      if (kids != 0) return 0;
      return 1;
    }
  } else {
    if (hg == 1)
      return (kids == 0);
    else {
      if (kids != 2) return 0;
      for (int i : g[nod]) {
        if (i != par) kids -= check(i, nod, del, hg - 1);
      }
      return (kids == 0);
    }
  }
}
bool good(int del, int root) { return check(root, 0, del, n); }
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cin >> n;
  m = (1 << n) - 2;
  for (int i = 1; i < m; i++) {
    cin >> first >> second;
    g[first].push_back(second);
    g[second].push_back(first);
  }
  for (int i = 1; i <= m; i++) {
    if (g[i].size() == 2) {
      int gd = 1;
      for (int j : g[i]) {
        if (g[j].size() == 1) gd = 0;
      }
      if (gd)
        b = i;
      else
        a = i;
    } else if (g[i].size() == 4)
      a = i;
  }
  if (a && b && good(a, b)) {
    cout << 1 << '\n' << a;
    return 0;
  }
  int st = 0;
  for (int i = 1; i <= m; i++) {
    if (g[i].size() == 1) st = i;
  }
  queue<int> q;
  d[st] = 1;
  p[st] = 0;
  q.push(st);
  while (q.size()) {
    int nod = q.front();
    q.pop();
    for (int i : g[nod]) {
      if (!d[i]) d[i] = d[nod] + 1, p[i] = nod, q.push(i);
    }
  }
  st = 0;
  for (int i = 1; i <= m; i++) {
    if (d[i] == 2 * n - 2) st = i;
  }
  for (int i = 1; i <= n - 2; i++) st = p[st];
  a = st;
  b = p[st];
  if (a && b && good(a, a)) {
    cout << 2 << '\n' << min(a, b) << ' ' << max(a, b);
    return 0;
  }
  cout << 0;
}
