#include <bits/stdc++.h>
using namespace std;
const int _N = 1e5 + 11;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
int n, a[_N], res[_N], curr[_N];
void calc(int md) {
  if (res[md] > 0) return;
  int diff = 0, st = 1;
  memset(curr, 0, sizeof curr);
  for (int i = 1; i <= n; i++) {
    if (++curr[a[i]] == 1) diff += 1;
    if (diff <= md) continue;
    res[md] += 1;
    for (int j = st; j < i; j++)
      if (--curr[a[j]] == 0) diff -= 1;
    st = i;
  }
  res[md] += 1;
}
void solve(int l, int r) {
  if (l + 1 == r) return;
  if (res[l] == res[r]) {
    for (int i = l + 1; i < r; i++) {
      res[i] = res[r];
    }
    return;
  }
  int md = (l + r) >> 1;
  calc(md);
  solve(l, md);
  solve(md, r);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  calc(1);
  calc(n);
  solve(1, n);
  for (int i = 1; i <= n; i++) printf("%d ", res[i]);
  return 0;
}
