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;
inline int Read() {
  char c = getchar();
  int num = 0;
  while ('0' > c || c > '9') c = getchar();
  while ('0' <= c && c <= '9') num = num * 10 + c - '0', c = getchar();
  return (num);
}
int wr[10], wt;
inline void Write(int x) {
  wt = 0;
  while (x) wr[++wt] = x % 10, x /= 10;
  for (int i = wt; i; i--) putchar((char)wr[i] + '0');
  putchar(' ');
}
int rt[200010], t[200010 * 20], ch[200010 * 20][2], a[200010], pr[200010], ans,
    n, N;
inline void Ins(int rt1, int rt, int l, int r, int a, int b) {
  t[rt] = t[rt1] + b;
  int md = (l + r) / 2;
  if (l == r) return;
  if (a <= md) {
    ch[rt][0] = ++N, ch[rt][1] = ch[rt1][1];
    Ins(ch[rt1][0], ch[rt][0], l, md, a, b);
  } else {
    ch[rt][1] = ++N, ch[rt][0] = ch[rt1][0];
    Ins(ch[rt1][1], ch[rt][1], md + 1, r, a, b);
  }
}
inline int Ask(int x, int l, int r, int a) {
  int md = (l + r) / 2;
  if (l == r) {
    if (a < t[x])
      return (n + 1);
    else
      return (l);
  }
  int nm1 = t[ch[x][1]];
  if (nm1 > a)
    return (Ask(ch[x][1], md + 1, r, a));
  else {
    int R = md + 1;
    int L = Ask(ch[x][0], l, md, a - nm1);
    if (L == n + 1)
      return (R);
    else
      return (L);
  }
}
int main() {
  n = Read();
  for (int i = 1; i <= n; i++) a[i] = Read();
  for (int i = 1; i <= n; i++) {
    int rt_ = rt[i - 1];
    Ins(rt_, rt[i] = ++N, 1, n, i, 1);
    if (pr[a[i]]) rt_ = rt[i], Ins(rt_, rt[i] = ++N, 1, n, pr[a[i]], -1);
    pr[a[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (i == 5) int deb = 0;
    ans = 1;
    for (int j = Ask(rt[n], 1, n, i) - 1; j;) {
      ans++;
      j = Ask(rt[j], 1, n, i) - 1;
    }
    Write(ans);
  }
  puts("");
}
