#include <bits/stdc++.h>
int max2(int a, int b) { return a > b ? a : b; }
int v;
std::vector<std::vector<int>> edges;
std::vector<std::pair<int, int>> DFS(int start,
                                     std::vector<int> avoidance = {}) {
  std::vector<std::pair<int, int>> result(v + 1, {-1, -1});
  std::vector<bool> avoidance_bool(v + 1, false);
  for (int avoided : avoidance) avoidance_bool[avoided] = true;
  if (avoidance_bool[start]) throw "undefined";
  std::vector<int> stack_previous = {-1}, stack_now = {start};
  result[start] = {-1, 0};
  while (!stack_now.empty()) {
    int prev = stack_previous.back();
    stack_previous.pop_back();
    int now = stack_now.back();
    stack_now.pop_back();
    for (int next : edges[now])
      if (prev != next && !avoidance_bool[next]) {
        result[next] = {now, result[now].second + 1};
        stack_previous.push_back(now);
        stack_now.push_back(next);
      }
  }
  return result;
}
std::vector<int> path(int start, int goal,
                      std::vector<std::pair<int, int>> dfs_result = {}) {
  if (dfs_result.empty()) dfs_result = DFS(goal);
  std::vector<int> answer;
  for (int now = start; now != goal; now = dfs_result[now].first)
    answer.push_back(now);
  answer.push_back(goal);
  return answer;
}
std::vector<int> diameter_path() {
  int max_dist = -1, diameter_first = -1, diameter_second = -1;
  std::vector<std::pair<int, int>> DFSresult1 = DFS(1);
  for (int i = 1; i <= v; i++)
    if (max_dist < DFSresult1[i].second)
      max_dist = DFSresult1[i].second, diameter_first = i;
  std::vector<std::pair<int, int>> DFSresult2 = DFS(diameter_first);
  max_dist = -1;
  for (int i = 1; i <= v; i++)
    if (max_dist < DFSresult2[i].second)
      max_dist = DFSresult2[i].second, diameter_second = i;
  return path(diameter_second, diameter_first, DFSresult2);
}
void treeValidation(int now, int prev, int level, int &errored,
                    bool &globalValidationStatus) {
  if (!globalValidationStatus) return;
  std::vector<int> childs;
  for (int next : edges[now])
    if (next != prev) childs.push_back(next);
  if (level == 0) {
    if (!childs.empty()) globalValidationStatus = false;
    return;
  } else if (childs.size() == 2) {
    treeValidation(childs[0], now, level - 1, errored, globalValidationStatus);
    treeValidation(childs[1], now, level - 1, errored, globalValidationStatus);
    return;
  } else if (childs.size() == 1) {
    if (errored != -1 || level != 1) {
      globalValidationStatus = false;
      return;
    }
    errored = now;
    treeValidation(childs[0], now, level - 1, errored, globalValidationStatus);
    return;
  } else if (childs.size() == 3) {
    if (errored != -1 || level < 2) {
      globalValidationStatus = false;
      return;
    }
    errored = now;
    int maxdegree[3] = {-1, -1, -1};
    for (int i = 0; i < 3; i++) {
      std::vector<std::pair<int, int>> DFSresult = DFS(childs[i], {now});
      for (int j = 1; j <= v; j++)
        maxdegree[i] = max2(maxdegree[i], DFSresult[j].second);
    }
    for (int i = 0; i < 3; i++)
      if (maxdegree[i] == level - 1) {
        treeValidation(childs[i], now, level - 1, errored,
                       globalValidationStatus);
        for (int j = 0; j < 3; j++)
          if (i != j)
            treeValidation(childs[j], now, level - 2, errored,
                           globalValidationStatus);
        return;
      }
    globalValidationStatus = false;
  } else
    globalValidationStatus = false;
}
int main(int argc, char **argv) {
  int n;
  scanf("%d", &n);
  v = (1 << n) - 2;
  edges.resize(v + 1);
  for (int i = 0; i < v - 1; i++) {
    int start, end;
    scanf("%d %d", &start, &end);
    edges[start].push_back(end);
    edges[end].push_back(start);
  }
  std::vector<int> diameter = diameter_path();
  int diameter_size = diameter.size();
  bool validationStatus = true;
  if (diameter_size % 2 == 1) {
    int root = diameter[diameter_size / 2], errored = -1;
    treeValidation(root, -1, n - 1, errored, validationStatus);
    if (validationStatus)
      for (int i = 1; i <= v; i++)
        if (edges[i].size() != 1 && edges[i].size() != 3 && i != root) {
          printf("1\n%d\n", i);
          return 0;
        }
  } else {
    int c1 = diameter[diameter_size / 2], c2 = diameter[diameter_size / 2 - 1],
        errored = -2;
    treeValidation(c1, c2, n - 2, errored, validationStatus);
    treeValidation(c2, c1, n - 2, errored, validationStatus);
    if (validationStatus) {
      if (c1 > c2) std::swap(c1, c2);
      printf("2\n%d %d\n", c1, c2);
      return 0;
    }
  }
  printf("0\n");
  return 0;
}
