#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100010;
int n;
int data[MAX_N], belong[MAX_N], ans[MAX_N];
inline int uniqueDivide(int x) {
  memset(belong, -1, sizeof(belong));
  int ret = 1, cnt = 0;
  for (int i = 1; i <= n; ++i) {
    if (belong[data[i]] == ret) continue;
    belong[data[i]] = ret;
    cnt++;
    if (cnt > x) {
      cnt = 1;
      belong[data[i]] = ++ret;
    }
  }
  return ret;
}
void solve(int left, int right) {
  int numLeft = uniqueDivide(left);
  int numRight = uniqueDivide(right);
  ans[left] = numLeft, ans[right] = numRight;
  if (numLeft == numRight) {
    for (int i = left + 1; i < right; ++i) ans[i] = numLeft;
    return;
  }
  int mid = (left + right) >> 1;
  solve(left, mid);
  solve(mid + 1, right);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &data[i]);
  solve(1, n);
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  puts("");
  return 0;
}
