#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, a[N], res[N], cnt[N];
int get(int k) {
  int ans = 0, p = 0, m = 0;
  for (int i = 0; i < n; i++) {
    m += !cnt[a[i]]++;
    if (m > k) {
      ans++;
      while (p < i) m -= !--cnt[a[p++]];
    }
  }
  while (p < n) cnt[a[p++]]--;
  return ++ans;
}
void build(int st = 1, int en = n + 1, int mn = 1, int mx = n) {
  if (st > en) return;
  int mid = st + en >> 1;
  res[mid] = mn < mx ? get(mid) : mn;
  build(st, mid - 1, res[mid], mx), build(mid + 1, en, mn, res[mid]);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  build();
  for (int i = 1; i <= n; i++) cout << res[i] << ' ';
}
