#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, vis[maxn], c[maxn], cnt, ans[maxn];
int get(int k) {
  int tot = 1, now = 0;
  cnt++;
  for (int i = 1; i <= n; i++) {
    if (vis[c[i]] == cnt) continue;
    vis[c[i]] = cnt;
    now++;
    if (now > k) {
      now = 1;
      cnt++;
      vis[c[i]] = cnt;
      tot++;
    }
  }
  return tot;
}
void solve(int l, int r) {
  if (l > r) return;
  int t1 = get(l), t2 = get(r);
  if (t1 == t2) {
    for (int i = l; i <= r; i++) ans[i] = t1;
    return;
  }
  ans[l] = t1;
  ans[r] = t2;
  int mid = (l + r) >> 1;
  solve(l + 1, mid);
  solve(mid + 1, r - 1);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> c[i];
  solve(1, n);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
