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
from collections import Counter
import bisect


def main():
    N = int(input())
    A = list(map(int, input().split()))
    count_list = list(Counter(A).values())
    count_list.sort()
    cumsum_count = [0] * len(count_list)
    cumsum_count[0] = count_list[0]
    for i in range(1, len(count_list)):
        cumsum_count[i] = cumsum_count[i - 1] + count_list[i]
    ans_list = [0] * N
    n_max = N
    for k in range(1, len(count_list) + 1):
        # 最大でも N // k 回まで。
        # 各カード n_max 枚まで使って k * n_max の長方形領域を全部埋め尽くせるかを調べる。
        # 埋め尽くせる最小の n_max が答え。
        n_max = min(n_max, N // k)
        s = 0
        while True:
            # n_max 枚以上あるカードは n_max 枚固定
            index = bisect.bisect_left(count_list, n_max)
            s = n_max * (len(count_list) - index)
            # それ未満のカードはそのまま全部使う
            if index > 0:
                s += cumsum_count[index - 1]
            if s >= k * n_max or n_max == 0:
                break
            n_max -= 1
        ans_list[k - 1] = n_max
    for ans in ans_list:
        print(ans)


if __name__ == '__main__':
    main()