After foiling the squirrels' plans several times it is now time for the counterattack! From Julian's data it can be seen that there exists a big red button in the shape of an acorn — which possesses the ability to teleport them to who knows where — somewhere on the squirrel fleet (for emergency food stash purposes). William is currently trying to plot the shortest counter-invasion path through the squirrel armada; however, he has extreme difficulties doing math of any kind ...
Given is an unweighted tree with
Constraints
Subtask 1 [30%]
Subtask 2 [70%]
No additional constraints.
Input Specification
The first line of input will contain a single integer
Output Specification
Output one line with
Sample Input
6
1 2
2 6
2 3
3 4
3 5
Sample Output
1 2 6 3 4 5
Comments