#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, A[N], V[N], P[N];
int f(int x) {
  int R = 0, C = 0;
  memset(V, -1, sizeof V);
  for (int i = (1); i <= (n); ++i) {
    if (V[A[i]] == R) continue;
    V[A[i]] = R, C++;
    if (C > x) V[A[i]] = ++R, C = 1;
  }
  return R + 1;
}
void S(int L, int R) {
  if (L > R) return;
  int l = f(L), r = f(R), m = (L + R) >> 1;
  ;
  if (l == r) {
    for (int i = (L); i <= (R); ++i) P[i] = l;
    return;
  }
  P[L] = l, P[R] = r, S(L + 1, m), S(m + 1, R - 1);
}
int main() {
  cin >> n;
  for (int i = (1); i <= (n); ++i) cin >> A[i];
  S(1, n);
  for (int i = (1); i <= (n); ++i) printf("%d ", P[i]);
}
