The State of Confusion contains cities, numbered through , and bidirectional roads.
Road connects cities and and has length miles.
All cities are connected. No road connects a city to itself, and there is at most one road between
any pair of cities. The distance between two cities is the length of the shortest path connecting
them.
For every city, find the distance to the city farthest from it.
输入格式
The first line contains an integer (), the number of cities.
Each of the next lines contains three integers , , and (),
describing one road.
输出格式
Output integers on one line. The th integer is the distance from city to its farthest
city.