Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
F. One Node is Gone

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou have an integer $$$n$$$. Let's define following tree generation as McDic's generation:

- Make a complete and full binary tree of $$$2^{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.
- Select a non-root vertex $$$v$$$ from that binary tree.
- Remove $$$v$$$ from tree and make new edges between $$$v$$$'s parent and $$$v$$$'s direct children. If $$$v$$$ 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.

Input

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

The $$$i$$$-th of the next $$$2^{n} - 3$$$ lines contains two integers $$$a_{i}$$$ and $$$b_{i}$$$ ($$$1 \le a_{i} \lt b_{i} \le 2^{n} - 2$$$) — meaning there is an edge between $$$a_{i}$$$ and $$$b_{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 $$$0$$$.

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.

Examples

Input

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

Output

1 3

Input

2 1 2

Output

2 1 2

Input

3 1 2 2 3 3 4 4 5 5 6

Output

0

Note

In the first example, $$$3$$$ is the only possible answer.

In the second example, there are $$$2$$$ possible answers.

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

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/04/2020 17:41:31 (g2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|