#P1228F. One Node is Gone

    ID: 4144 Type: RemoteJudge 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: 9 Uploaded By: Tags>constructive algorithmsimplementationtrees*2500

One Node is Gone

Description

You have an integer nn. Let's define following tree generation as McDic's generation:

  1. Make a complete and full binary tree of 2n12^{n} - 1 vertices. Complete and full binary tree means a tree that exactly one vertex is a root, all leaves have the same depth (distance from the root), and all non-leaf nodes have exactly two child nodes.
  2. Select a non-root vertex vv from that binary tree.
  3. Remove vv from tree and make new edges between vv's parent and vv's direct children. If vv has no children, then no new edges will be made.

You have a tree. Determine if this tree can be made by McDic's generation. If yes, then find the parent vertex of removed vertex in tree.

The first line contains integer nn (2n172 \le n \le 17).

The ii-th of the next 2n32^{n} - 3 lines contains two integers aia_{i} and bib_{i} (1ai<bi2n21 \le a_{i} \lt b_{i} \le 2^{n} - 2) — meaning there is an edge between aia_{i} and bib_{i}. It is guaranteed that the given edges form a tree.

Print two lines.

In the first line, print a single integer — the number of answers. If given tree cannot be made by McDic's generation, then print 00.

In the second line, print all possible answers in ascending order, separated by spaces. If the given tree cannot be made by McDic's generation, then don't print anything.

Input

The first line contains integer nn (2n172 \le n \le 17).

The ii-th of the next 2n32^{n} - 3 lines contains two integers aia_{i} and bib_{i} (1ai<bi2n21 \le a_{i} \lt b_{i} \le 2^{n} - 2) — meaning there is an edge between aia_{i} and bib_{i}. It is guaranteed that the given edges form a tree.

Output

Print two lines.

In the first line, print a single integer — the number of answers. If given tree cannot be made by McDic's generation, then print 00.

In the second line, print all possible answers in ascending order, separated by spaces. If the given tree cannot be made by McDic's generation, then don't print anything.

Sample Input 1

4
1 2
1 3
2 4
2 5
3 6
3 13
3 14
4 7
4 8
5 9
5 10
6 11
6 12

Sample Output 1

1
3

Sample Input 2

2
1 2

Sample Output 2

2
1 2

Sample Input 3

3
1 2
2 3
3 4
4 5
5 6

Sample Output 3

0

Note

In the first example, 33 is the only possible answer.

In the second example, there are 22 possible answers.

In the third example, the tree can't be generated by McDic's generation.