Fulkerson

아직 제출이 없습니다시간 제한5초메모리 제한512 MB

문제

Lester and Delbert already know how to disconnect a railroad network by exploding the minimum possible number of railways. That turned out to be pretty easy, so they went on with another interesting problem: how to rob the Federal Bank. Now they need your assistance to prepare an escape plan.

The Bank is situated in the city that has NN intersections and N1N - 1 bidirectional roads connecting them. All roads are of the same length. It is possible to get from any intersection to any other using the road network.

To ensure a safe escape, Lester and Delbert plan to hire KK alert groups and place them at different intersections to collect information about police movements. Once the placement is defined, for each of the intersections they calculate the minimum possible number of roads one needs to travel to reach some of the alert groups. The maximum of this value among all intersections is called the threat level of the current placement.

Lester wants to hire only one alert group, while Delbert prefers to use NN of them. As the resulting solution will most likely lie somewhere in between, they ask you to calculate the minimum possible threat level that can be achieved for every possible value of KK.

입력

The first line of input contains a single integer NN, the number of intersections in the city (1N150,0001 \leq N \leq 150\\,000). The next N1N-1 lines contain descriptions of the roads. Each description consists of two integers uu and vv, denoting that there is a road between these intersections (1u,vN1 \le u, v \le N, uvu \neq v). It is guaranteed that it is possible to get from any intersection to any other using the road network.

출력

The output must consist of NN integers. The ii-th of these integers must be equal to the minimal possible threat level that could be achieved by using exactly ii alert groups.

힌트

number of alert groupsone of the optimal placementsoptimal distance
173
27, 92
31, 5, 62
41, 5, 7, 91
51, 5, 7, 9, 101
61, 5, 7, 8, 9, 101
71, 5, 6, 7, 8, 9, 101
81, 4, 5, 6, 7, 8, 9, 101
91, 3, 4, 5, 6, 7, 8, 9, 101
101, 2, 3, 4, 5, 6, 7, 8, 9, 100