#include <bits/stdc++.h>
using namespace std;
int const M = 2e5 + 10, M2 = 1e7 + 10, mod = 1e9 + 7, inf = 1e9 + 10;
int a[M], mark[M], cnt[M], nxt[M], seg[M * 4];
vector<int> l[M];
void upd(int l, int r, int ind, int node, int inc) {
  seg[node] += inc;
  if (r - l == 1) return;
  int mid = (l + r) >> 1;
  if (ind < mid)
    upd(l, mid, ind, node * 2, inc);
  else
    upd(mid, r, ind, node * 2 + 1, inc);
}
int bin(int l, int r, int x, int node) {
  int mid = (l + r) >> 1;
  if (r - l == 1) return l;
  if (seg[node * 2] > x) return bin(l, mid, x, node * 2);
  return bin(mid, r, x - seg[node * 2], node * 2 + 1);
}
int32_t main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    if (!mark[a[i]])
      mark[a[i]] = i, upd(1, n + 1, i, 1, 1);
    else
      nxt[mark[a[i]]] = i, mark[a[i]] = i;
  }
  for (int i = 1; i <= n; i++) l[1].push_back(i);
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < l[i].size(); j++) {
      int ind = l[i][j];
      cnt[ind]++;
      if (seg[1] <= ind) continue;
      l[bin(1, n + 1, ind, 1)].push_back(ind);
    }
    if (nxt[i]) upd(1, n + 1, nxt[i], 1, 1);
    upd(1, n + 1, i, 1, -1);
  }
  for (int i = 1; i <= n; i++) cout << cnt[i] << " ";
}
