#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  vector<int> solve(int n, vector<pair<int, int>>& edges) {
    if (n == 2) {
      assert(edges.size() == 1);
      return {edges[0].first, edges[0].second};
    }
    const int N = (1 << n) - 2;
    vector<vector<int>> graph(N);
    vector<int> degrees(N, 0);
    for (auto& e : edges) {
      int u = e.first, v = e.second;
      graph[u].push_back(v);
      graph[v].push_back(u);
      ++degrees[v];
      ++degrees[u];
    }
    vector<vector<int>> nodes(6);
    for (int i = 0; i < N; ++i) {
      if (degrees[i] > 4) {
        return {};
      }
      nodes[degrees[i]].push_back(i);
    }
    const int INF = 1 << 28;
    vector<int> ord(N);
    vector<int> pars(N, -1);
    vector<int> rank(N, 0);
    vector<int> dis(N, INF);
    auto BFS = [&](int s) {
      int sz = 0;
      fill(pars.begin(), pars.end(), -1);
      fill(dis.begin(), dis.end(), INF);
      dis[s] = 0;
      ord[sz++] = s;
      for (int i = 0; i < sz; ++i) {
        int u = ord[i];
        for (auto v : graph[u]) {
          if (v == pars[u]) {
            continue;
          }
          pars[v] = u;
          dis[v] = dis[u] + 1;
          ord[sz++] = v;
        }
      }
    };
    auto diameter = [&]() {
      BFS(0);
      int s = -1;
      for (int i = 0; i < N; ++i) {
        if (s == -1 || dis[s] < dis[i]) {
          s = i;
        }
      }
      BFS(s);
      int t = -1;
      for (int i = 0; i < N; ++i) {
        if (t == -1 || dis[t] < dis[i]) {
          t = i;
        }
      }
      vector<int> dia;
      {
        int u = t;
        while (u != -1) {
          dia.push_back(u);
          u = pars[u];
        }
      }
      return dia;
    };
    vector<int> children(N + 10);
    auto check = [&](int rt) {
      fill(rank.begin(), rank.end(), 0);
      BFS(rt);
      reverse(ord.begin(), ord.end());
      vector<int> cands;
      for (auto u : ord) {
        int p = pars[u];
        int sz = 0;
        for (auto v : graph[u]) {
          if (v == p) {
            continue;
          }
          children[sz++] = v;
        }
        if (sz == 0) {
          continue;
        }
        int mx = 0;
        for (int i = 0; i < sz; ++i) {
          mx = max(mx, rank[children[i]]);
        }
        int cnt = 0;
        for (int i = 0; i < sz; ++i) {
          if (mx != rank[children[i]]) {
            if (mx > rank[children[i]] + 1) {
              return false;
            }
            ++cnt;
          }
        }
        if (cnt != 0 && cnt != 2) {
          return false;
        }
        if (cnt > 0 || sz == 1) {
          cands.push_back(u);
        }
        rank[u] = mx + 1;
      }
      if (cands.size() != 1) {
        return false;
      }
      return true;
    };
    if (!nodes[4].empty()) {
      if (nodes[4].size() > 1) {
        return {};
      }
      if (nodes[2].size() != 1) {
        return {};
      }
      int rt = nodes[2][0];
      if (check(rt)) {
        return nodes[4];
      }
      return {};
    }
    if (nodes[2].empty()) {
      auto dia = diameter();
      int m = dia.size();
      if (m & 1) {
        return {};
      }
      vector<int> res;
      for (auto x : {dia[(m - 1) / 2], dia[m / 2]}) {
        if (check(x)) {
          res.push_back(dia[(m - 1) / 2] + dia[m / 2] - x);
        }
      }
      assert(res.empty() || res.size() == 2);
      return res;
    }
    if (!nodes[2].empty()) {
      if (nodes[2].size() != 2) {
        return {};
      }
      vector<int> res;
      for (auto x : nodes[2]) {
        if (check(x)) {
          res.push_back(nodes[2][0] + nodes[2][1] - x);
        }
      }
      assert(res.empty() || res.size() == 1);
      return res;
    }
    return {};
  }
};
int main(int argc, char** argv) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  Solution sol;
  int n;
  cin >> n;
  int N = (1 << n) - 3;
  vector<pair<int, int>> edges;
  for (int i = 0; i < N; ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    edges.emplace_back(u, v);
  }
  auto res = sol.solve(n, edges);
  sort(res.begin(), res.end());
  cout << res.size() << '\n';
  for (auto x : res) {
    cout << x + 1 << ' ';
  }
  cout << '\n';
  return 0;
}
