#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5, pot = 131072;
int a[maxn];
int iduci[maxn];
vector<int> q[pot + 1];
int prosl[maxn];
int sol[maxn];
struct tournament {
  int t[pot * 2];
  void update(int x, int val) {
    for (; x > 0; x /= 2) {
      t[x] += val;
    }
  }
  int query(int k) {
    int x = 1;
    while (x < pot) {
      if (t[x * 2] > k) {
        x *= 2;
      } else {
        k -= t[x * 2];
        x = x * 2 + 1;
      }
    }
    return x - pot;
  }
};
tournament T;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (!prosl[a[i]]) {
      T.update(i + pot, 1);
    } else {
      iduci[prosl[a[i]] - 1] = i;
    }
    prosl[a[i]] = i + 1;
    q[0].push_back(i);
  }
  for (int i = 0; i < n; i++) {
    while (!q[i].empty()) {
      sol[q[i].back()]++;
      q[T.query(q[i].back() + 1)].push_back(q[i].back());
      q[i].pop_back();
    }
    T.update(i + pot, -1);
    if (iduci[i]) {
      T.update(iduci[i] + pot, 1);
    }
  }
  for (int i = 0; i < n; i++) {
    cout << sol[i] << " ";
  }
  cout << '\n';
  return 0;
}
