#include <bits/stdc++.h>
using namespace std;
int a[300000], ans[300000], n;
int get(int k) {
  int cnt = 1, num = 0;
  int f[300000];
  memset(f, 0, sizeof(f));
  for (int i = 1; i <= n; ++i) {
    if (f[a[i]] == cnt) continue;
    ++num;
    f[a[i]] = cnt;
    if (num > k) ++cnt, f[a[i]] = cnt, num = 1;
  }
  return cnt;
}
void work(int l, int r) {
  if (l > r) return;
  int ans1 = get(l), ans2 = get(r), mid = (l + r) >> 1;
  if (ans1 == ans2) {
    for (int i = l; i <= r; ++i) ans[i] = ans1;
    return;
  }
  work(l, mid);
  work(mid + 1, r);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  work(1, n);
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  return 0;
}
