Farmer John's $N$ barns are connected by a tree-shaped network. Bessie the cow wants to sabotage the network by cutting power to a single barn, which removes that barn together with all of its connections.
Removing one barn breaks the network into several pieces, each of which is still internally connected. To be as disruptive as possible, Bessie wants every resulting piece to contain no more than half of all the barns.
In other words, find every barn whose removal leaves each remaining piece with at most $\lfloor N/2 \rfloor$ barns.
$1 \le N \le 10,000$
The first line contains the number of barns $N$. The barns are numbered from $1$ to $N$.
Each of the next $N-1$ lines contains two integers $X$ and $Y$, indicating that barn $X$ and barn $Y$ are connected.
Print, in increasing numerical order and one per line, the number of every barn whose removal splits the network into pieces that each contain at most half of all the barns ($\lfloor N/2 \rfloor$ or fewer).
If no such barn exists, print a single line containing the word NONE.