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 INF = 1000000404;
const long long MOD = 1000000007ll;
const long double PI = acos(-1.0);
const long double EPS = 1e-9;
template <typename t1, typename t2>
inline void upmax(t1 &a, t2 b) {
  a = max(a, (t1)b);
}
template <typename t1, typename t2>
inline void upmin(t1 &a, t2 b) {
  a = min(a, (t1)b);
}
template <typename T>
inline T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <typename T>
inline T lcm(T a, T b) {
  return a * (b / gcd(a, b));
}
template <typename T>
inline T sqr(T a) {
  return a * a;
}
template <typename T>
inline bool pal(T &x) {
  int n = (int((x.size())));
  for (int i = 0; i < n / 2; i++) {
    if (x[i] != x[n - i - 1]) return 0;
  }
  return 1;
}
template <typename T>
inline void rev(T &x) {
  int n = (int((x.size())));
  for (int i = 0; i < n / 2; i++) swap(x[i], x[n - i - 1]);
}
int month[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
inline long long mp(long long a, long long b) { return (a << 31) + b; }
class compare {
 public:
  bool operator()(const int a, const int b) const { return 1; }
};
int SQ = 400;
int root[211111];
int cnt[211111];
int nxt[211111];
int prv[211111];
int last[211111];
int t[211111 * 18];
int L[211111 * 18];
int R[211111 * 18];
int a[211111];
int timer = 0;
int n;
void persistent_build(int v, int tl = 1, int tr = n) {
  if (tl == tr) {
    if (last[a[tl]] == 0) {
      t[v] = 1;
    } else {
      nxt[last[a[tl]]] = tl;
    }
    last[a[tl]] = tl;
  } else {
    int tm = (tl + tr) >> 1;
    L[v] = ++timer;
    R[v] = ++timer;
    persistent_build(L[v], tl, tm);
    persistent_build(R[v], tm + 1, tr);
    t[v] = t[L[v]] + t[R[v]];
  }
}
void update(int v, int orig_v, int pos, int val, int tl = 1, int tr = n) {
  if (tl == tr) {
    t[v] = val;
  } else {
    int tm = (tl + tr) >> 1;
    if (pos <= tm) {
      L[v] = ++timer;
      R[v] = R[orig_v];
      update(L[v], L[orig_v], pos, val, tl, tm);
    } else {
      L[v] = L[orig_v];
      R[v] = ++timer;
      update(R[v], R[orig_v], pos, val, tm + 1, tr);
    }
    t[v] = t[L[v]] + t[R[v]];
  }
}
int first_one(int v, int tl, int tr) {
  if (tl == tr) {
    if (t[v])
      return tl;
    else
      return n + 1;
  } else {
    int tm = (tl + tr) >> 1;
    if (t[L[v]] == 0)
      return first_one(R[v], tm + 1, tr);
    else
      return first_one(L[v], tl, tm);
  }
}
int get_next_segment(int v, int k, int tl = 1, int tr = n) {
  if (t[v] <= k) return n + 1;
  int tm = (tl + tr) >> 1;
  if (t[L[v]] > k) return get_next_segment(L[v], k, tl, tm);
  if (t[L[v]] == k) {
    return first_one(R[v], tm + 1, tr);
  } else {
    return (get_next_segment(R[v], k - t[L[v]], tm + 1, tr));
  }
}
void print(int v, int tl = 1, int tr = n) {
  if (tl == tr) {
    if (t[v])
      cout << "@";
    else
      cout << "_";
  } else {
    int tm = (tl + tr) >> 1;
    print(L[v], tl, tm);
    print(R[v], tm + 1, tr);
  }
}
void solve() {
  cin >> n;
  for (int i = 1; i < n + 1; i++) cin >> a[i];
  root[1] = root[2] = 0;
  persistent_build(0);
  for (int i = 2; i < n + 1; i++) {
    root[i * 2 - 1] = ++timer;
    update(root[i * 2 - 1], root[i * 2 - 2], i - 1, 0);
    if (nxt[i - 1] != 0) {
      root[i * 2] = ++timer;
      update(root[i * 2], root[i * 2 - 1], nxt[i - 1], 1);
    } else {
      root[i * 2] = root[i * 2 - 1];
    }
  }
  for (int k = 1; k < n + 1; k++) {
    int NEXT = 1;
    int ans = 0;
    while (NEXT != n + 1) {
      ans++;
      NEXT = get_next_segment(root[NEXT * 2], k);
    }
    cout << ans << ' ';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  };
  getchar();
  getchar();
  return 0;
}
