import std.stdio, std.string, std.conv;
int n, x, k;
int[300999] C, U;
void main(){
	readf("%d\n", &n);
	foreach(a; readln.split.to!(int[])) ++C[a];
	foreach(c; C) for(x = 0; c; ) U[x++] += c--;
	for(x = n, k = 1; k <= n; k ++){
		while(k * x > n - U[x]) --x;
		x.writeln;
	}
}
