Head of the Organization#5366

Head of the Organization

1 second
128 megabytes
Very easy

In a certain organization, there are individuals. Over some time, it has been established who directly communicates with whom within the organization. Based on these connections, it is known that the structure of direct communication forms a tree. The head of the organization is at the root of this tree, and every individual has direct subordinates corresponding to the tree's children. Individuals communicate only with their direct subordinates and their direct superior.

However, while the connections are known, it is not clear who occupies the topmost position in the hierarchy. Therefore, only the undirected communication links are known, forming a tree structure, but the root (head of organization) is not known.

Suppose the head of the organization wishes to maximize their influence. It is speculated that the head is the person for whom, after they are removed from the communication network, the largest remaining connected group of individuals is as small as possible. Find all possible candidates for the head of the organization.

Input

The first line contains the number of individuals (2 \leq n \leq 50000). The individuals are numbered from to . Each of the next n - 1 lines contains two numbers a_i, b_i, indicating that individuals a_i and b_i communicate directly. It is guaranteed that the set of communication links forms a tree.

Output

Print, in a single line, the numbers of all possible candidates for the head of the organization, in increasing order, separated by spaces.

prb5366.gif

Examples

Example 1

Loading
Loading