Takahashi has N cards. The i-th of these cards has an integer A_i written on it.

Takahashi will choose an integer K, and then repeat the following operation some number of times:

* Choose exactly K cards such that the integers written on them are all different, and eat those cards. (The eaten cards disappear.)



For each K = 1,2, \ldots, N, find the maximum number of times Takahashi can do the operation.

Constraints

* 1 \le N \le 3 \times 10^5
* 1 \le A_i \le N
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N
A_1 A_2 \ldots A_N


Output

Print N integers. The t-th (1 \le t \le N) of them should be the answer for the case K=t.

Examples

Input

3
2 1 2


Output

3
1
0


Input

5
1 2 3 4 5


Output

5
2
1
1
1


Input

4
1 3 3 3


Output

4
1
0
0
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
"""
.2分探索を考える
.各kに対してx回以上抜き出せるかという問いを考える
.各数の個数を数えて数iの個数をCiとする
.各数iを抜き出せるのはCiまで
 ⇒各数を抜き出す回数min(Ci,x)
.Σmin(Ci,x)はkx以上でなければいけない(k個x回抜き出すため)
.これを満たすときx回抜き出せる
.このままではO(n^2(logn))なので工夫する
.Σ(min(Ci,x))はk依存でないのでここを工夫する(Σ(min(Ci,x))をSxとする)
.SxはSx-1と比べてx以上のCiの数だけ増える(x以上のCiの数をDxとする)
.Sx := Sx-1 + Dx
.Dxを求める時はCのリストについてbisectを行う。
⇒Ciの個数のリストdを用意してdの累積和を用意しておくとO(n)
.Sx >= k*xとなるxの最大値を2分探索で求める。(O(nlogn))
⇒変形すると,Sx/x >= kであり、各kに対してSx/xは単調減少なのでO(n)
"""
n = I()
a = LI()
cnt = list(Counter(a).values())
d = [0]*(n+1)
for i in cnt:
    d[i] += 1
d = list(accumulate(d))
m = d[-1]
S = [0]*(n+1)
for i in range(1,n+1):
    S[i] = S[i-1] + (m - d[i-1]) 
S2 = [0]*(n+1)
for i in range(1,n+1):
    S2[i] = S[i]//i
tmp = n
for k in range(1,n+1):
    while S2[tmp] < k:
        tmp -= 1
        if tmp <= 0:
            print(0)
            break
    else:
        print(tmp)
