// I AM A MUSLIM
#include "bits/stdc++.h"
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define fast_io std::ios::sync_with_stdio(0);std::cin.tie(0)
#define lli long long int
#define flush fflush(stdout)
#define new_line printf("\n")
#define yn(a, b) printf("%s\n", (a) >= (b) ? "Yes":"No")
#define amodm(a, M) (((a)%M+M)%M)
// #define int lli
using pii = std::pair<int,int>;
const int MOD = 1000000007;
const int mxN = 200100;
int present[mxN];
signed main() {
int testCases=1;
// scanf("%d",&testCases);
for (int TC = 1; TC <= testCases; TC++) {
int n;
scanf("%d",&n);
for (int i = 0, v; i < n; i++) {
scanf("%d",&v);
present[v]++;
}
for (int k = 1; k <= n; k++) {
int ans = 1;
for (int v = 100000; v >= 1; v--) {
int multiple = 1, possible = 0;
while ((lli)multiple*v <= 100000) {
possible += present[multiple*v];
multiple++;
}
if (possible >= k) {
ans = v;
break;
}
}
printf("%d ", ans);
}
}
return 0;
}
/*
*/