Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np
from collections import Counter

N = int(input())
A = list(map(int,input().split()))

a = Counter(A).values()
B = list(a)
B = np.array(B)
F = [0] * N
for i in range(1,N+1):
    F[i-1] = np.sum(np.minimum(B, i)) / i
num = N
K = 1
while K < N + 1:
    if F[num - 1] >= K:
        print(num)
        K += 1
    else:
        num -= 1
    if num == 0 and K != N + 1:
        for i in range(N-K+1):
            print(0)
        K = N + 1

Fixed submission:
# -*- coding: utf-8 -*-
from collections import Counter
from itertools import accumulate

N = int(input())
A = list(map(int,input().split()))

B = list(Counter(A).values())

C = [0] * N 
for i in B:
    C[i-1] += 1

F = list(accumulate(C))

S = [0] * N
f = [0] * N
S[0] = f[0] = sum(C) 
for i in range(2, N+1):
    S[i-1] = (S[i-2] + C[i-1] + S[0] - F[i-1] ) 
    f[i-1] = S[i-1] / i

f.sort()
n = 0     
K = 1
    
while K != N+1:
    if K <= f[n]:
        print(N-n)
        K += 1
    else:
        n += 1
    if n == N:
        for i in range(N-K+1):
            print(0)
        K = N+1

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import numpy as np
from collections import Counter

N = int(input())
A = list(map(int,input().split()))

a = Counter(A).values()
B = list(a)
B = np.array(B)
F = [0] * N
for i in range(1,N+1):
    F[i-1] = np.sum(np.minimum(B, i)) / i
num = N
K = 1
while K < N + 1:
    if F[num - 1] >= K:
        print(num)
        K += 1
    else:
        num -= 1
    if num == 0 and K != N + 1:
        for i in range(N-K+1):
            print(0)
        K = N + 1

Fixed submission:
# -*- coding: utf-8 -*-
from collections import Counter
from itertools import accumulate

N = int(input())
A = list(map(int,input().split()))

B = list(Counter(A).values())

C = [0] * N 
for i in B:
    C[i-1] += 1

F = list(accumulate(C))

S = [0] * N
f = [0] * N
S[0] = f[0] = sum(C) 
for i in range(2, N+1):
    S[i-1] = (S[i-2] + C[i-1] + S[0] - F[i-1] ) 
    f[i-1] = S[i-1] / i

f.sort()
n = 0     
K = 1
    
while K != N+1:
    if K <= f[n]:
        print(N-n)
        K += 1
    else:
        n += 1
    if n == N:
        for i in range(N-K+1):
            print(0)
        K = N+1

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import numpy as np

N = int(input())
A = list(map(int,input().split()))

B = [0] * N
for i in A:
    B[i-1] += 1
B = np.array(B)

K = 1
F = [0] * N
for i in range(0,N):
    f = np.sum(np.minimum(B, N-i)) / (N - i)
    while K <= f:
        print(N - i)
        K += 1
    if K == N+1:
        break
    if i == (N - 1) and K != N+1:
        while K != N+1:
            print(0)
            K += 1

Fixed submission:
# -*- coding: utf-8 -*-
from collections import Counter
from itertools import accumulate

N = int(input())
A = list(map(int,input().split()))

B = list(Counter(A).values())

C = [0] * N 
for i in B:
    C[i-1] += 1

F = list(accumulate(C))

S = [0] * N
f = [0] * N
S[0] = f[0] = sum(C) 
for i in range(2, N+1):
    S[i-1] = (S[i-2] + C[i-1] + S[0] - F[i-1] ) 
    f[i-1] = S[i-1] / i

f.sort()
n = 0     
K = 1
    
while K != N+1:
    if K <= f[n]:
        print(N-n)
        K += 1
    else:
        n += 1
    if n == N:
        for i in range(N-K+1):
            print(0)
        K = N+1

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int,input().split()))

B = [0] * N
for i in A:
    B[i-1] += 1

K = 1
F = [0] * N
for i in range(0,N):
    f = 0
    for j in range(N):
        f += min(B[j],N - i)
    f = f / (N - i)
    while K <= f:
        print(N - i)
        K += 1
    if K == N+1:
        break
    if i == (N - 1) and K != N+1:
        while K != N+1:
            print(0)
            K += 1

Fixed submission:
# -*- coding: utf-8 -*-
from collections import Counter
from itertools import accumulate

N = int(input())
A = list(map(int,input().split()))

B = list(Counter(A).values())

C = [0] * N 
for i in B:
    C[i-1] += 1

F = list(accumulate(C))

S = [0] * N
f = [0] * N
S[0] = f[0] = sum(C) 
for i in range(2, N+1):
    S[i-1] = (S[i-2] + C[i-1] + S[0] - F[i-1] ) 
    f[i-1] = S[i-1] / i

f.sort()
n = 0     
K = 1
    
while K != N+1:
    if K <= f[n]:
        print(N-n)
        K += 1
    else:
        n += 1
    if n == N:
        for i in range(N-K+1):
            print(0)
        K = N+1

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import bisect

N = int(input())
A = list(map(int,input().split()))

B = [0 for _ in range(N)]
for i in A:
    B[i-1] += 1

F = []
for i in range(1,N+1):
    f = 0
    for j in range(N):
        f += min(B[j],i)
    f = f / i
    F.append(f)
F.sort()

for k in range(N):
    x = bisect.bisect_left(F,k+1)
    print(N-x)


Fixed submission:
# -*- coding: utf-8 -*-
from collections import Counter
from itertools import accumulate

N = int(input())
A = list(map(int,input().split()))

B = list(Counter(A).values())

C = [0] * N 
for i in B:
    C[i-1] += 1

F = list(accumulate(C))

S = [0] * N
f = [0] * N
S[0] = f[0] = sum(C) 
for i in range(2, N+1):
    S[i-1] = (S[i-2] + C[i-1] + S[0] - F[i-1] ) 
    f[i-1] = S[i-1] / i

f.sort()
n = 0     
K = 1
    
while K != N+1:
    if K <= f[n]:
        print(N-n)
        K += 1
    else:
        n += 1
    if n == N:
        for i in range(N-K+1):
            print(0)
        K = N+1

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int,input().split()))

B = [0 for _ in range(N)]
for i in A:
    B[i-1] += 1

for i in range(N):
    ans = 0
    C = B
    C = sorted(C, reverse = True)
    while C[i] != 0:
       
        for j in range(i+1):
               C[j] -= 1
        C = sorted(C, reverse = True)
        ans += 1
    print(ans)


Fixed submission:
# -*- coding: utf-8 -*-
from collections import Counter
from itertools import accumulate

N = int(input())
A = list(map(int,input().split()))

B = list(Counter(A).values())

C = [0] * N 
for i in B:
    C[i-1] += 1

F = list(accumulate(C))

S = [0] * N
f = [0] * N
S[0] = f[0] = sum(C) 
for i in range(2, N+1):
    S[i-1] = (S[i-2] + C[i-1] + S[0] - F[i-1] ) 
    f[i-1] = S[i-1] / i

f.sort()
n = 0     
K = 1
    
while K != N+1:
    if K <= f[n]:
        print(N-n)
        K += 1
    else:
        n += 1
    if n == N:
        for i in range(N-K+1):
            print(0)
        K = N+1

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int,input().split()))

B = [0 for _ in range(N)]
for i in A:
    B[i-1] += 1
B = tuple(sorted(B, reverse = True))

for i in range(N):
    ans = 0
    C = list(B)
    while C[i] != 0:
        for j in range(i+1):
            C[j] -= 1
        C = sorted(C, reverse = True)
        ans += 1
    print(ans)

Fixed submission:
# -*- coding: utf-8 -*-
from collections import Counter
from itertools import accumulate

N = int(input())
A = list(map(int,input().split()))

B = list(Counter(A).values())

C = [0] * N 
for i in B:
    C[i-1] += 1

F = list(accumulate(C))

S = [0] * N
f = [0] * N
S[0] = f[0] = sum(C) 
for i in range(2, N+1):
    S[i-1] = (S[i-2] + C[i-1] + S[0] - F[i-1] ) 
    f[i-1] = S[i-1] / i

f.sort()
n = 0     
K = 1
    
while K != N+1:
    if K <= f[n]:
        print(N-n)
        K += 1
    else:
        n += 1
    if n == N:
        for i in range(N-K+1):
            print(0)
        K = N+1