using System;
using System.Text;
using CompLib.Util;

public class Program
{
    private int N;
    private int[] A;

    public void Solve()
    {
        var sc = new Scanner();
        N = sc.NextInt();
        A = sc.IntArray();

        // f(x) x個の列を取り出せる最大の長さ
        /*
         * C_j Aのjの個数
         * f(x) = (Σ min(C_j, X))/X
         *
         * D_k Cのkの個数
         *
         * f(x) = (Σ min(k, X)*D_k)/X
         *      = (Σ{k=0}^{x}{k*D_k} + X*Σ{k = X+1}^{N}{D_k})/X
         *
         * 前計算をしておく
         */

        int[] c = new int[N + 1];
        foreach (int i in A)
        {
            c[i]++;
        }

        int[] d = new int[N + 1];
        foreach (int i in c)
        {
            d[i]++;
        }

        long[] a = new long[N + 1];
        for (int k = 1; k <= N; k++)
        {
            a[k] = a[k - 1] + (long) k * d[k];
        }

        long[] b = new long[N + 1];
        b[0] = d[0];
        for (int k = 1; k <= N; k++)
        {
            b[k] = b[k - 1] + d[k];
        }

        long[] f = new long[N + 1];
        for (int x = 0; x <= N; x++)
        {
            if (x == 0)
            {
                f[x] = long.MaxValue;
            }
            else
            {
                long aa = a[x];
                long bb = (b[N] - b[x]) * x;
                f[x] = (aa + bb) / x;
            }
        }

        var sb = new StringBuilder();
        for (int t = 1; t <= N; t++)
        {
            int ng = 0;
            int ok = N + 1;
            while (ok - ng > 1)
            {
                int mid = (ok + ng) / 2;
                if (f[mid] < t) ok = mid;
                else ng = mid;
            }

            sb.AppendLine(ng.ToString());
        }

        Console.Write(sb);
    }

    public static void Main(string[] args) => new Program().Solve();
}

namespace CompLib.Util
{
    using System;
    using System.Linq;

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            if (_index >= _line.Length)
            {
                string s;
                do
                {
                    s = Console.ReadLine();
                } while (s.Length == 0);

                _line = s.Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public string ReadLine()
        {
            _index = _line.Length;
            return Console.ReadLine();
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            string s = Console.ReadLine();
            _line = s.Length == 0 ? new string[0] : s.Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}

Measured memory_bytes: 56620