#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> edge[(1 << 18)];
int degree[(1 << 18)];
int DelNode;
int DFS(int iDeep, int iNode, int iParent) {
  int iSons = edge[iNode].size();
  if (iParent) iSons--;
  if (iDeep > n) return -1;
  if (iSons > 3) return -1;
  if (iSons == 0) return 1;
  if (iSons & 1) {
    if (DelNode) return -1;
    DelNode = iNode;
    vector<int> RetList;
    for (auto Iter : edge[iNode]) {
      if (Iter == iParent) continue;
      int iRet = DFS(iDeep + 1, Iter, iNode);
      if (-1 == iRet) return iRet;
      RetList.push_back(iRet);
    }
    sort(RetList.begin(), RetList.end());
    if (iSons == 1) {
      if (RetList[0] != 1) return -1;
      return RetList[0] + 1;
    } else {
      if (RetList[0] != RetList[1] || RetList[0] + 1 != RetList[2]) return -1;
      return RetList[2] + 1;
    }
  } else {
    assert(iSons == 2);
    int iDeepToButtom = -1;
    for (auto Iter : edge[iNode]) {
      if (Iter == iParent) continue;
      int iRet = DFS(iDeep + 1, Iter, iNode);
      if (-1 == iRet) return iRet;
      if (iDeepToButtom == -1)
        iDeepToButtom = iRet;
      else if (iDeepToButtom != iRet)
        return -1;
    }
    return iDeepToButtom + 1;
  }
}
int main() {
  scanf("%d", &n);
  int k = (1 << n) - 2;
  for (int i = 0; i < k - 1; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    edge[u].push_back(v);
    edge[v].push_back(u);
    degree[u]++;
    degree[v]++;
  }
  vector<int> list;
  for (int i = 1; i <= k; ++i)
    if (degree[i] == 1) {
      list.push_back(i);
    }
  for (int i = 0; i < list.size(); ++i) {
    int iCur = list[i];
    for (auto Iter : edge[iCur]) {
      if (--degree[Iter] == 1) list.push_back(Iter);
    }
  }
  assert(list.size() == k);
  int i = 0;
  vector<int> result;
  for (auto Iter = list.rbegin(); i < 5 && Iter != list.rend(); Iter++, i++) {
    DelNode = 0;
    if (DFS(1, *Iter, 0) != -1) {
      assert(DelNode);
      result.push_back(DelNode);
    }
  }
  sort(result.begin(), result.end());
  result.resize(unique(result.begin(), result.end()) - result.begin());
  printf("%d\n", result.size());
  for (int i = 0; i < result.size(); ++i) {
    if (i) putchar(' ');
    printf("%d", result[i]);
  }
  putchar('\n');
}
