An undirected weighted tree is given. Find the longest path in it: identify two vertices such that the distance between them is maximized.
The first line contains the number of vertices in the tree n~(2 \le n \le 10^5). The following n - 1 lines describe the edges. Each line contains three integers: the numbers of the vertices connected by an edge (vertices are numbered from to ) and the weight w~(1 \le w \le 10^5) of the edge.
Print the length of the longest path in the tree.

Example 1