#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 233;
int first[maxn], nex[maxn], ch[maxn], ans[maxn], q[maxn], n;
vector<int> a[maxn];
void add(int x, int v) {
  for (int i = x; i <= n; i += i & (-i)) ch[i] += v;
  return;
}
int find(int k) {
  int x = 0;
  for (int i = 20; i >= 0; i--)
    if (x + (1 << i) <= n && ch[x + (1 << i)] <= k) {
      x += 1 << i;
      k -= ch[x];
    }
  return x + 1;
}
int main() {
  memset(first, 0, sizeof(first));
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &q[i]);
  for (int i = n; i >= 1; i--) {
    int x = q[i];
    nex[i] = first[x];
    first[x] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (first[i]) add(first[i], 1);
    a[1].push_back(i), ans[i] = 0;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < a[i].size(); j++) {
      int cur = a[i][j];
      int pos = find(cur);
      ans[cur]++;
      a[pos].push_back(cur);
    }
    add(i, -1);
    if (nex[i]) add(nex[i], 1);
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
