#include <bits/stdc++.h>
using namespace std;
int a[200000], ans[200000], col[200000], n;
inline int get(int x) {
  memset(col, 0, sizeof(col));
  int cnt = 0, ans = 1;
  for (int i = 1; i <= n; i++) {
    if (col[a[i]] == ans) continue;
    cnt++;
    col[a[i]] = ans;
    if (cnt > x) {
      ans++;
      cnt = 1;
      col[a[i]] = ans;
    }
  }
  return ans;
}
void solve(int l, int r) {
  if (l > r) return;
  ans[l] = get(l), ans[r] = get(r);
  if (ans[l] == ans[r]) {
    for (int i = l + 1; i <= r - 1; i++) ans[i] = ans[l];
    return;
  }
  int mid = l + (r - l) / 2;
  solve(l + 1, mid), solve(mid, r - 1);
  return;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  solve(1, n);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
