Rick and Morty want to find MR. PBH and they can't do it alone. So they need of Mr. Meeseeks. They Have generated n Mr. Meeseeks, standing in a line numbered from 1 to n. Each of them has his own color. i-th Mr. Meeseeks' color is ai. 

Rick and Morty are gathering their army and they want to divide Mr. Meeseeks into some squads. They don't want their squads to be too colorful, so each squad should have Mr. Meeseeks of at most k different colors. Also each squad should be a continuous subarray of Mr. Meeseeks in the line. Meaning that for each 1 ≤ i ≤ e ≤ j ≤ n, if Mr. Meeseeks number i and Mr. Meeseeks number j are in the same squad then Mr. Meeseeks number e should be in that same squad.

<image>

Also, each squad needs its own presidio, and building a presidio needs money, so they want the total number of squads to be minimized.

Rick and Morty haven't finalized the exact value of k, so in order to choose it, for each k between 1 and n (inclusive) need to know the minimum number of presidios needed.

Input

The first line of input contains a single integer n (1 ≤ n ≤ 105) — number of Mr. Meeseeks.

The second line contains n integers a1, a2, ..., an separated by spaces (1 ≤ ai ≤ n) — colors of Mr. Meeseeks in order they standing in a line.

Output

In the first and only line of input print n integers separated by spaces. i-th integer should be the minimum number of presidios needed if the value of k is i.

Examples

Input

5
1 3 4 3 3


Output

4 2 1 1 1 


Input

8
1 5 7 8 1 7 6 1


Output

8 4 3 2 1 1 1 1 

Note

For the first sample testcase, some optimal ways of dividing army into squads for each k are:

  1. [1], [3], [4], [3, 3]
  2. [1], [3, 4, 3, 3]
  3. [1, 3, 4, 3, 3]
  4. [1, 3, 4, 3, 3]
  5. [1, 3, 4, 3, 3]



For the second testcase, some optimal ways of dividing army into squads for each k are:

  1. [1], [5], [7], [8], [1], [7], [6], [1]
  2. [1, 5], [7, 8], [1, 7], [6, 1]
  3. [1, 5, 7], [8], [1, 7, 6, 1]
  4. [1, 5, 7, 8], [1, 7, 6, 1]
  5. [1, 5, 7, 8, 1, 7, 6, 1]
  6. [1, 5, 7, 8, 1, 7, 6, 1]
  7. [1, 5, 7, 8, 1, 7, 6, 1]
  8. [1, 5, 7, 8, 1, 7, 6, 1]
#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
const int M = 6000005;
int col[N], rec[N], root[N], cnt = 0;
int lc[M], rc[M], key[M], rightmost[M];
inline void Insert(int x, int y, int l, int r, int pos, int val) {
  key[x] = key[y] + val;
  if (l == r) {
    rightmost[x] = key[x];
    return;
  }
  int mid = (l + r) >> 1, tmp;
  if (pos <= mid) {
    tmp = ++cnt;
    rc[x] = rc[y];
    Insert(tmp, lc[y], l, mid, pos, val);
    lc[x] = tmp;
  } else {
    tmp = ++cnt;
    lc[x] = lc[y];
    Insert(tmp, rc[y], mid + 1, r, pos, val);
    rc[x] = tmp;
  }
  rightmost[x] = rightmost[rc[x]];
}
inline int Query(int x, int l, int r, int kth) {
  if (l == r) return l;
  int mid = (l + r) >> 1;
  if (key[rc[x]] > kth)
    return Query(rc[x], mid + 1, r, kth);
  else if (key[rc[x]] == kth) {
    if (rightmost[lc[x]] == 0)
      return Query(lc[x], l, mid, 0);
    else
      return Query(rc[x], mid + 1, r, kth);
  } else
    return Query(lc[x], l, mid, kth - key[rc[x]]);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &col[i]);
  for (int i = 1; i <= n; i++) {
    root[i] = ++cnt;
    if (rec[col[i]]) {
      Insert(root[i], root[i - 1], 1, n, rec[col[i]], -1);
      Insert(root[i], root[i], 1, n, i, 1);
    } else
      Insert(root[i], root[i - 1], 1, n, i, 1);
    rec[col[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    int r = n, ans = 0;
    while (r >= 1) {
      ans++;
      if (key[root[r]] <= i) break;
      r = Query(root[r], 1, n, i) - 1;
    }
    printf("%d ", ans);
  }
  printf("\n");
  return 0;
}
