#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int ans[N], col[N], tab[N], n;
inline int count(int x) {
  memset(tab, 0, sizeof(tab));
  int ret = 1, cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (tab[col[i]] == ret) continue;
    tab[col[i]] = ret;
    cnt++;
    if (cnt > x) {
      cnt = 1;
      tab[col[i]] = ++ret;
    }
  }
  return ret;
}
inline void work(int l, int r) {
  if (l > r) return;
  int cl = count(l);
  if (l == r) {
    ans[l] = cl;
    return;
  }
  int cr = count(r);
  if (cl == cr) {
    for (int i = l; i <= r; i++) ans[i] = cl;
    return;
  }
  ans[l] = cl;
  ans[r] = cr;
  int mid = (l + r) >> 1;
  work(l + 1, mid);
  work(mid + 1, r - 1);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &col[i]);
  work(1, n);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
