There are islands where beavers live. The islands are numbered from through . These islands are connected by bidirectional bridges. The bridges are numbered from through . The bridge connects the island and the island . It is possible to travel between any islands using some bridges. Each island is inhabited by a beaver.
Sometimes, beavers living in some islands gather in an island, and have a meeting. When the attendees of a meeting are fixed, one of the islands satisfying the following condition is chosen as the location of the meeting:
The sum of the numbers of bridges the attendees have to pass through to gather in the chosen island is minimized.
Here, when the attendees of a meeting are fixed, each attendee of the meeting moves from their island of residence to the location of the meeting by passing through the minimum number of bridges.
The attendees of a meeting are looking forward to it very much if there are many candidates for the location of the meeting. When the attendees of a meeting are fixed, the expectation score of the meeting is calculated as the number of candidate islands for the location of the meeting satisfying the above condition. For each integer between and , inclusive, you want to know the maximum expectation score of a meeting where beavers will attend.
Write a program which, given the information of the islands, calculates, for each number of attendees, the maximum expectation score of a meeting.
Input Specification
Read the following data from the standard input. Given values are all integers.
Output Specification
Write lines to the standard output. In the -th line (), output the maximum expectation score of a meeting with attendees.
Constraints
- .
- ().
- ().
- ().
- It is possible to travel between any islands using some bridges.
Subtasks
- (4 points) .
- (16 points) .
- (80 points) No additional constraints.
Sample Input 1
5
1 2
2 3
4 2
3 5
Sample Output 1
1
4
1
2
1
Explanation for Sample 1
For example, we consider a meeting where the beaver in the island and the beaver in the island will attend. For each island, the sum of the numbers of bridges they have to pass through is calculated as follows.
- If they gather in the island , the the beaver in the island does not pass through bridges, and the beaver in the island has to pass through bridges. The sum is .
- If they gather in the island , the sum of the numbers of bridges they have to pass through is .
- If they gather in the island , the sum of the numbers of bridges they have to pass through is .
- If they gather in the island , the sum of the numbers of bridges they have to pass through is .
- If they gather in the island , the sum of the numbers of bridges they have to pass through is .
The candidates for the location of the meeting are the islands , , . Therefore, the expectation score of this meeting is .
Sample Input 2
7
1 2
2 3
3 4
4 5
2 6
3 7
Sample Output 2
1
5
1
3
1
2
1
Comments