from collections import Counter

from itertools import accumulate

import bisect



printRows = lambda x:print('\n'.join(map(str,x)))



n = int(input())

a = list(map(int, input().split()))

b = sorted(Counter(a).values())

exist = len(b)

b = [0]*(n-exist)+b

c = list(accumulate([0]+b))



ans = [n]

for k in range(2,n+1):

    l = 0

    r = n//k+1

    while r-l>1:

        x = (r+l)//2

        i = bisect.bisect_left(b,x)

        if c[i]+(n-i)*x>=x*k:

            l = x

        else:

            r = x

    ans.append(l)



printRows(ans)

from collections import Counter

from itertools import accumulate

import bisect



printRows = lambda x:print('\n'.join(map(str,x)))



n = int(input())

a = list(map(int, input().split()))

b = sorted(Counter(a).values())

exist = len(b)

b = [0]*(n-exist)+b

c = list(accumulate([0]+b))



ans = [n]

for k in range(2,exist+1):

    l = 0

    r = n//k+1

    while r-l>1:

        x = (r+l)//2

        i = bisect.bisect_left(b,x)

        if c[i]+(n-i)*x>=x*k:

            l = x

        else:

            r = x

    ans.append(l)



printRows(ans+[0]*(n-exist))

from collections import Counter
from itertools import accumulate
import bisect

printRows = lambda x: print("\n".join(map(str, x)))
n = int(input())
a = list(map(int, input().split()))
b = sorted(Counter(a).values())
exist = len(b)
b = [0] * (n - exist) + b
c = list(accumulate([0] + b))
ans = [n]
for k in range(2, n + 1):
    l = 0
    r = n // k + 1
    while r - l > 1:
        x = (r + l) // 2
        i = bisect.bisect_left(b, x)
        if c[i] + (n - i) * x >= x * k:
            l = x
        else:
            r = x
    ans.append(l)
printRows(ans)

from collections import Counter
from itertools import accumulate
import bisect

printRows = lambda x: print("\n".join(map(str, x)))
n = int(input())
a = list(map(int, input().split()))
b = sorted(Counter(a).values())
exist = len(b)
b = [0] * (n - exist) + b
c = list(accumulate([0] + b))
ans = [n]
for k in range(2, exist + 1):
    l = 0
    r = n // k + 1
    while r - l > 1:
        x = (r + l) // 2
        i = bisect.bisect_left(b, x)
        if c[i] + (n - i) * x >= x * k:
            l = x
        else:
            r = x
    ans.append(l)
printRows(ans + [0] * (n - exist))

-for k in range(2, n + 1): +for k in range(2, exist + 1): -printRows(ans) +printRows(ans + [0] * (n - exist))