A tree consisting of vertices is given.
For each vertex, determine the maximum distance to any other vertex.
The first line contains an integer n~(1 \le n \le 2 \cdot 10^5) — the number of vertices in the tree. The vertices are numbered from to .
The next n - 1 lines describe the edges: each line contains two integers and b~(1 \le a, b \le n), indicating that there is an edge between vertices and .
Print integers. For each vertex from to , print the maximum distance to any other vertex in the tree.

Example 1