1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
import collections
n = int(input())
counts = collections.defaultdict(int)
for i in [int(x) for x in input().split()]:
    counts[i] += 1

results = [0 for _ in range(n)]
for a in counts.values():
    for i in range(1, a + 1):
        results[i - 1] += a - a % i

print(" ".join([str(x) for x in results]))