#include <bits/stdc++.h>
using namespace std;
int n, m, a[1001000], k, sum[1001000], c[1001000], xian[1001000],
    nextt[1001000], ans[1001000];
vector<int> f[1001000];
inline int getint() {
  int w = 0, q = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') q = 1, c = getchar();
  while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar();
  return q ? -w : w;
}
int lowbit(int x) { return x & -x; }
void add(int x, int val) {
  for (; x <= n + 1; x += x & -x) c[x] += val;
}
int find(int x) {
  int pos = 0;
  for (int i = 17; i >= 0; i--) {
    if (pos + (1 << i) <= n + 1 && c[pos + (1 << i)] < x)
      x -= c[pos + (1 << i)], pos += (1 << i);
  }
  return pos + 1;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) a[i] = getint();
  for (int i = 1; i <= n + 1; i++) xian[i] = n + 1;
  for (int i = n + 1; i >= 1; i--) {
    nextt[i] = xian[a[i]];
    xian[a[i]] = i;
  }
  for (int i = 1; i <= n + 1; i++) add(xian[i], 1), f[1].push_back(i);
  ;
  for (int i = 1; i <= n; i++) {
    int w = f[i].size();
    for (int j = 0; j < w; j++) {
      int d = f[i][j];
      int wz = find(d + 1);
      ans[d]++;
      f[wz].push_back(d);
    }
    add(i, -1), add(nextt[i], 1);
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
