#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MX = 2e5 + 5;
const long long INF = 1e18;
const long double PI = 4 * atan((long double)1);
template <class T>
bool ckmin(T& a, const T& b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
namespace input {
template <class T>
void re(complex<T>& x);
template <class T1, class T2>
void re(pair<T1, T2>& p);
template <class T>
void re(vector<T>& a);
template <class T, size_t SZ>
void re(array<T, SZ>& a);
template <class T>
void re(T& x) {
  cin >> x;
}
void re(double& x) {
  string t;
  re(t);
  x = stod(t);
}
void re(long double& x) {
  string t;
  re(t);
  x = stold(t);
}
template <class T, class... Ts>
void re(T& t, Ts&... ts) {
  re(t);
  re(ts...);
}
template <class T>
void re(complex<T>& x) {
  T a, b;
  re(a, b);
  x = cd(a, b);
}
template <class T1, class T2>
void re(pair<T1, T2>& p) {
  re(p.first, p.second);
}
template <class T>
void re(vector<T>& a) {
  for (int i = (0); i < ((int)a.size()); ++i) re(a[i]);
}
template <class T, size_t SZ>
void re(array<T, SZ>& a) {
  for (int i = (0); i < (SZ); ++i) re(a[i]);
}
}  // namespace input
using namespace input;
namespace output {
void pr(int x) { cout << x; }
void pr(long x) { cout << x; }
void pr(long long x) { cout << x; }
void pr(unsigned x) { cout << x; }
void pr(unsigned long x) { cout << x; }
void pr(unsigned long long x) { cout << x; }
void pr(float x) { cout << x; }
void pr(double x) { cout << x; }
void pr(long double x) { cout << x; }
void pr(char x) { cout << x; }
void pr(const char* x) { cout << x; }
void pr(const string& x) { cout << x; }
void pr(bool x) { pr(x ? "true" : "false"); }
template <class T>
void pr(const complex<T>& x) {
  cout << x;
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x);
template <class T>
void pr(const T& x);
template <class T, class... Ts>
void pr(const T& t, const Ts&... ts) {
  pr(t);
  pr(ts...);
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x) {
  pr("{", x.first, ", ", x.second, "}");
}
template <class T>
void pr(const T& x) {
  pr("{");
  bool fst = 1;
  for (const auto& a : x) pr(!fst ? ", " : "", a), fst = 0;
  pr("}");
}
void ps() { pr("\n"); }
template <class T, class... Ts>
void ps(const T& t, const Ts&... ts) {
  pr(t);
  if (sizeof...(ts)) pr(" ");
  ps(ts...);
}
void pc() { pr("]\n"); }
template <class T, class... Ts>
void pc(const T& t, const Ts&... ts) {
  pr(t);
  if (sizeof...(ts)) pr(", ");
  pc(ts...);
}
}  // namespace output
using namespace output;
namespace io {
void setIn(string second) { freopen(second.c_str(), "r", stdin); }
void setOut(string second) { freopen(second.c_str(), "w", stdout); }
void setIO(string second = "") {
  cin.sync_with_stdio(0);
  cin.tie(0);
  if ((int)second.size()) {
    setIn(second + ".in"), setOut(second + ".out");
  }
}
}  // namespace io
using namespace io;
template <int SZ>
struct TreeDiameter {
  int n;
  vector<int> adj[SZ];
  void addEdge(int a, int b) { adj[a].push_back(b), adj[b].push_back(a); }
  int par[SZ], dist[SZ];
  void dfs(int x) {
    for (auto& y : adj[x])
      if (y != par[x]) {
        par[y] = x;
        dist[y] = dist[x] + 1;
        dfs(y);
      }
  }
  void genDist(int x) {
    par[x] = -1;
    dist[x] = 0;
    dfs(x);
  }
  int diaLen;
  vector<int> center, dia = {1, 1};
  void init(int _n) {
    n = _n;
    genDist(1);
    for (int i = (1); i < (n + 1); ++i)
      if (dist[i] > dist[dia[0]]) dia[0] = i;
    genDist(dia[0]);
    for (int i = (1); i < (n + 1); ++i)
      if (dist[i] > dist[dia[1]]) dia[1] = i;
    diaLen = dist[dia[1]];
    int cen = dia[1];
    for (int i = (0); i < (diaLen / 2); ++i) cen = par[cen];
    if (diaLen & 1)
      center = {cen, par[cen]};
    else
      center = {cen};
  }
};
TreeDiameter<MX> T;
int n, dist[MX], par[MX];
set<int> ans, leafDist[MX];
void dfs(int a) {
  dist[a] = 0;
  for (auto& t : T.adj[a])
    if (t != par[a]) {
      par[t] = a;
      dfs(t);
      ckmax(dist[a], dist[t] + 1);
    }
}
bool check(int t, int b, int dis) {
  if (dis == 0) return (int)T.adj[t].size() == 1;
  if (t != b) {
    int child = 0;
    for (auto& c : T.adj[t])
      if (c != par[t]) {
        child++;
        if (!check(c, b, dis - 1)) return 0;
      }
    if (child != 2) return 0;
  } else {
    vector<pair<int, int> > v;
    for (auto& c : T.adj[t])
      if (c != par[t]) {
        v.push_back({dist[c], c});
      }
    sort(begin(v), end(v));
    if (dis > 1) {
      return (int)v.size() == 3 && check(v[0].second, b, dis - 2) &&
             check(v[1].second, b, dis - 2) && check(v[2].second, b, dis - 1);
    } else {
      return (int)v.size() == 1 && check(v[0].second, b, dis - 1);
    }
  }
  return 1;
}
void test(int t) {
  vector<int> bad;
  for (int i = (1); i < ((1 << n) - 1); ++i) {
    if (i == t) {
      if ((int)T.adj[i].size() != 2) bad.push_back(i);
    } else {
      if ((int)T.adj[i].size() != 3 && (int)T.adj[i].size() != 1)
        bad.push_back(i);
    }
  }
  if ((int)bad.size() != 1) return;
  par[t] = 0;
  dfs(t);
  if (check(t, bad[0], n - 1)) ans.insert(bad[0]);
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  re(n);
  for (int i = (0); i < ((1 << n) - 3); ++i) {
    int a, b;
    re(a, b);
    T.addEdge(a, b);
  }
  T.init((1 << n) - 2);
  for (auto& t : T.center) test(t);
  ps((int)ans.size());
  for (auto& t : ans) pr(t, ' ');
}
