#include <bits/stdc++.h>
using namespace std;
vector<int> adj[(1 << 17) + 9], VEC1, VEC2, ANS, TT;
int FLAG[(1 << 17) + 9];
int main() {
  int i, j, k, l, cas, ne, test, n, m, x, y, temp, val, now, q, w, e, root,
      flag, ii, o, p;
  cin >> n;
  m = (1 << n) - 3;
  for (i = 1; i <= m; i++) {
    cin >> j >> k;
    adj[j].push_back(k);
    adj[k].push_back(j);
  }
  if (n == 2) {
    cout << 2 << endl;
    cout << 1 << " " << 2 << endl;
    return 0;
  }
  x = y = 0;
  for (i = 1; i <= ((1 << n) - 1); i++)
    if (adj[i].size() == 2) x++;
  for (i = 1; i <= ((1 << n) - 1); i++)
    if (adj[i].size() == 4) y++;
  if (x > 0) {
    if (y > 0) {
      if (y == 1 && x == 1) {
        for (i = 1; i <= ((1 << n) - 1); i++)
          if (adj[i].size() == 4) val = i;
        for (i = 1; i <= ((1 << n) - 1); i++)
          if (adj[i].size() == 2) root = i;
        TT = adj[val];
        flag = 0;
        for (q = 0; q < 4 && !flag; q++) {
          for (w = 0; w < 4 && !flag; w++) {
            if (q == w) continue;
            adj[val].clear();
            adj[(1 << n) - 1].clear();
            for (e = 0; e < 4; e++) {
              ii = TT[e];
              adj[ii].erase(remove(adj[ii].begin(), adj[ii].end(), val),
                            adj[ii].end());
              adj[ii].erase(
                  remove(adj[ii].begin(), adj[ii].end(), ((1 << n) - 1)),
                  adj[ii].end());
            }
            for (e = 0; e < 4; e++) {
              ii = TT[e];
              adj[ii].push_back(val);
              adj[val].push_back(ii);
            }
            for (e = 0; e < 4; e++) {
              if (e == w) continue;
              if (e == q) continue;
              ii = TT[e];
              adj[ii].erase(remove(adj[ii].begin(), adj[ii].end(), val),
                            adj[ii].end());
              adj[val].erase(remove(adj[val].begin(), adj[val].end(), ii),
                             adj[val].end());
              adj[ii].push_back((1 << n) - 1);
              adj[(1 << n) - 1].push_back(ii);
            }
            adj[val].push_back((1 << n) - 1);
            adj[(1 << n) - 1].push_back(val);
            VEC1.clear();
            VEC1.push_back(root);
            memset(FLAG, 0, sizeof(FLAG));
            temp = 0;
            while (VEC1.size() > 0) {
              if (VEC1.size() != (1 << (temp))) break;
              VEC2.clear();
              for (j = 0; j < VEC1.size(); j++) {
                FLAG[VEC1[j]] = 1;
                for (k = 0; k < adj[VEC1[j]].size(); k++) {
                  if (FLAG[adj[VEC1[j]][k]] == 0) {
                    VEC2.push_back(adj[VEC1[j]][k]);
                  }
                }
              }
              sort(VEC2.begin(), VEC2.end());
              ;
              VEC1.clear();
              for (j = 0; j < VEC2.size(); j++) {
                if (j)
                  if (VEC2[j] == VEC2[j - 1]) continue;
                VEC1.push_back(VEC2[j]);
              }
              temp++;
            }
            if (n == temp) {
              flag = 1;
            }
          }
        }
        if (flag) ANS.push_back(val);
      }
    } else {
      for (i = 1; i <= ((1 << n) - 2); i++) {
        if (adj[i].size() == 2) {
          VEC1.clear();
          VEC1.push_back(i);
          memset(FLAG, 0, sizeof(FLAG));
          temp = 0;
          while (VEC1.size() > 0) {
            if (temp != n - 1)
              if (VEC1.size() != (1 << (temp))) break;
            if (temp == n - 1)
              if (VEC1.size() != ((1 << (temp)) - 1)) break;
            VEC2.clear();
            for (j = 0; j < VEC1.size(); j++) {
              FLAG[VEC1[j]] = 1;
              for (k = 0; k < adj[VEC1[j]].size(); k++) {
                if (FLAG[adj[VEC1[j]][k]] == 0) {
                  VEC2.push_back(adj[VEC1[j]][k]);
                }
              }
            }
            sort(VEC2.begin(), VEC2.end());
            ;
            VEC1.clear();
            for (j = 0; j < VEC2.size(); j++) {
              if (j)
                if (VEC2[j] == VEC2[j - 1]) continue;
              VEC1.push_back(VEC2[j]);
            }
            temp++;
          }
          if (n == temp) {
            for (j = 1; j <= ((1 << n) - 2); j++)
              if (adj[j].size() == 2 && i != j) ANS.push_back(j);
          }
        }
      }
    }
  } else {
    VEC1.clear();
    memset(FLAG, 0, sizeof(FLAG));
    for (i = 1; i <= ((1 << n) - 2); i++)
      if (adj[i].size() == 1) VEC1.push_back(i);
    for (i = n; i > 2; i--) {
      if (VEC1.size() != (1 << (i - 1))) break;
      VEC2.clear();
      for (j = 0; j < VEC1.size(); j++) {
        FLAG[VEC1[j]] = 1;
        for (k = 0; k < adj[VEC1[j]].size(); k++) {
          if (FLAG[adj[VEC1[j]][k]] == 0) {
            VEC2.push_back(adj[VEC1[j]][k]);
          }
        }
      }
      sort(VEC2.begin(), VEC2.end());
      ;
      VEC1.clear();
      for (j = 0; j < VEC2.size(); j++) {
        temp = VEC2[j];
        if (j)
          if (VEC2[j] == VEC2[j - 1]) continue;
        VEC1.push_back(VEC2[j]);
      }
      ANS = VEC1;
    }
    if (i != 2 || VEC1.size() != 2) ANS.clear();
  }
  cout << ANS.size() << endl;
  for (i = 0; i < ANS.size(); i++) cout << ANS[i] << " ";
  cout << endl;
}
