import core.bitop, std.bitmanip;
import core.checkedint;
import std.algorithm, std.functional;
import std.array, std.container;
import std.bigint;
import std.conv;
import std.math, std.numeric;
import std.range, std.range.interfaces;
import std.stdio, std.string;
import std.typecons;
 
void main()
{
    int n;
    readf("%s", &n);
    readln;

    auto arr = readln.chomp.split.map!(to!int).array;
    
    int[int] mp;
    
    arr.each!(x => mp[x] += 1);
    
    arr = mp.values.sort().array;
    arr.reverse;
    
    debug { arr.writeln; }
    
    auto ans = new int[] (n+1);
    
    int bar = n;
    int rest = arr.sum;
    int have = 0;
    int le = 0;
    foreach (i, e; arr.enumerate(1)) {
        rest -= e;
        have += min(e, bar);
        
        while (i * bar > have + rest) {
            bar -= 1;
            while (le < arr.length && arr[le] > bar) {
                ++le;
                have -= 1;
            }
        }
        
        ans[i] = bar;
    }
    
    ans.dropOne.map!(to!string).join(" ").writeln;
}