H. Team Division
time limit per test
4.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Technoblade is organizing a Hunger Games match, a "last survivor wins" type of game. Before the start, players are placed in a circle. Then, they are divided into teams. To facilitate organization, teams must consist of adjacent players in the circle.

Technoblade has already placed the players in a circle and now he just needs to divide them into teams. The players are numbered from $$$1$$$ to $$$n$$$, with player $$$i$$$ next to $$$i+1$$$ for $$$i \lt n$$$ and player $$$1$$$ next to player $$$n$$$. He knows the country of origin of each player $$$p_i$$$ and wants to diversify the teams by having at most $$$k$$$ players from the same country. Remember that players in the same team must be next to each other. For example, if $$$n=5$$$, we can have one team with players $$$1,5$$$ and another with $$$2,3,4$$$, since $$$5$$$ is next to $$$1$$$ and $$$2,3,4$$$ are in sequence. However, the team $$$1,3$$$ would be prohibited. It is worth noting that each player must be in exactly one team. To make the game fast, you want to minimize the number of teams, while ensuring that each team has at most $$$k$$$ players from the same country.

Since Techno has not decided on the value of $$$k$$$ yet, find the answer for all $$$k$$$ from $$$1$$$ to $$$n$$$.

Input

The first line contains a single integer $$$n$$$, $$$1 \leq n \leq 10^5$$$.

Followed by a line with $$$n$$$ integers $$$1 \leq p_i \leq n$$$ as described.

Output

Print $$$n$$$ lines. The $$$k$$$-th line being the smallest number of teams so that each team has at most $$$k$$$ players from the same country.

Examples
Input
5
1 2 1 2 1
Output
3
2
1
1
1
Input
6
1 2 2 1 2 1
Output
3
2
1
1
1
1
Note

Be careful with "endl" when printing large outputs.