#include <bits/stdc++.h>
using namespace std;
int n;
int col[100005];
int res[100005];
int getk(int k) {
  int count = 0;
  int countt = 0;
  int vis[100005];
  memset(vis, -1, sizeof vis);
  for (int i = 1; i <= n; i++) {
    if (vis[col[i]] == count) continue;
    vis[col[i]] = count;
    countt++;
    if (countt > k) {
      count++;
      countt = 1;
      vis[col[i]] = count;
    }
  }
  count++;
  res[k] = count;
  return count;
}
void erfen(int l, int r) {
  if (l > r) return;
  int numl, numr;
  if (res[l] != 0)
    numl = res[l];
  else
    numl = getk(l);
  if (res[r] != 0)
    numr = res[r];
  else
    numr = getk(r);
  if (numl == numr) {
    for (int i = l; i <= r; i++)
      if (res[i] == 0) res[i] = numl;
    return;
  }
  erfen(l + 1, (l + r) / 2);
  erfen((l + r) / 2, r - 1);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &col[i]);
  erfen(1, n);
  for (int i = 1; i <= n; i++) printf("%d ", res[i]);
  printf("\n");
  return 0;
}
