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]
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScan in = new MyScan(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, MyScan in, PrintWriter out) {
            int n = in.nextInt();
            int[] data = in.na(n);
            PersistedSegmentTreeInt tree = new PersistedSegmentTreeInt(n);
            PersistedSegmentTreeInt.Accessor[] nn = new PersistedSegmentTreeInt.Accessor[n];
            int[] prev = new int[100001];
            for (int s = 0; s < n; s++) {
                int l = data[s];
                nn[s] = tree.add(s, s, 1);
                if (prev[l] != 0) {
                    nn[s] = nn[s].add(prev[l] - 1, prev[l] - 1, -1);
                }
                prev[l] = s + 1;
            }


            int start;
            int ans;
            for (int sum = 1; sum <= n; sum++) {
                if (sum < 20) {
                    int[] lm = new int[sum];
                    Arrays.fill(lm, -1);
                    ans = 1;
                    for (int t = 0; t < n; t++) {
                        boolean f = false;
                        for (int i = 0; i < sum; i++) {
                            if (lm[i] == -1 || lm[i] == data[t]) {
                                lm[i] = data[t];
                                f = true;
                                break;
                            }
                        }
                        if (!f) {
                            t--;
                            Arrays.fill(lm, -1);
                            ans++;
                        }
                    }

                    out.print(ans + " ");
                    continue;
                }


                ans = 0;
                start = n - 1;
                while (start >= 0) {
                    start = nn[start].prevSumIndexTo(sum) - 1;
                    ans++;
                }
                out.print(ans + " ");
            }
        }

    }

    static class PersistedSegmentTreeInt {
        PersistedSegmentTreeInt.Node[] nn = new PersistedSegmentTreeInt.Node[200001];
        int s = 0;

        public PersistedSegmentTreeInt(int n) {
            nn = new PersistedSegmentTreeInt.Node[n * 2];
            nn[s++] = new PersistedSegmentTreeInt.Node(0, n - 1);
        }

        public Accessor add(int from, int to, int a) {
            return add(s - 1, from, to, a);
        }

        public Accessor add(int version, int from, int to, int a) {
            nn[s++] = nn[version].copy();
            nn[s - 1].add(from, to, a);
            return new Accessor(s - 1);
        }

        private int prevSumIndexTo(int version, int sum) {
            return nn[version].prevSumIndexTo(sum);
        }

        public class Accessor {
            private int version;

            public Accessor(int version) {
                this.version = version;
            }

            public Accessor add(int from, int to, int val) {
                return PersistedSegmentTreeInt.this.add(version, from, to, val);
            }

            public int prevSumIndexTo(int sum) {
                return PersistedSegmentTreeInt.this.prevSumIndexTo(version, sum);
            }

        }

        private static final class Node {
            int from;
            int to;
            PersistedSegmentTreeInt.Node left;
            PersistedSegmentTreeInt.Node right;
            int val;
            int sum;

            public Node(int from, int to) {
                this.from = from;
                this.to = to;
            }

            public PersistedSegmentTreeInt.Node copy() {
                PersistedSegmentTreeInt.Node r = new PersistedSegmentTreeInt.Node(from, to);
                r.val = val;
                r.sum = sum;
                r.left = left;
                r.right = right;
                return r;
            }

            private static int sum(PersistedSegmentTreeInt.Node node) {
                if (node == null) return 0;
                return node.sum + length(node) * node.val;
            }

            private static int length(PersistedSegmentTreeInt.Node node) {
                return node.to - node.from + 1;
            }

            public void add(int from, int to, int value) {
                if (from <= this.from && this.to <= to) {
                    val += value;
                    return;
                }
                if (to < this.from || this.to < from) return;
                sum += (Math.min(to, this.to) - Math.max(from, this.from) + 1) * value;
                addLeft(this.from, (this.from + this.to) / 2, from, to, value);
                addRight((this.from + this.to) / 2 + 1, this.to, from, to, value);
            }

            private void addLeft(int f1, int t1, int f2, int t2, int value) {
                if (t1 < f2 || t2 < f1) return;
                if (left == null) left = new PersistedSegmentTreeInt.Node(f1, t1);
                left = left.copy();
                left.add(f2, t2, value);
            }

            private void addRight(int f1, int t1, int f2, int t2, int value) {
                if (t1 < f2 || t2 < f1) return;
                if (right == null) right = new PersistedSegmentTreeInt.Node(f1, t1);
                right = right.copy();
                right.add(f2, t2, value);
            }

            public int prevSumIndexTo(int sum) {
                if (from == to || sum(this) <= sum) {
                    return from;
                }
//            propagate(this);
                int sumr = sum(right);
                if (sumr == sum) {
                    return left.lastZero();
                }
                if (sumr > sum) {
                    return right.prevSumIndexTo(sum);
                }
                return left.prevSumIndexTo(sum - sumr);

            }

            private int lastZero() {
                if (sum(this) == 0) {
                    return from;
                }
                if (from == to) {
                    return to + 1;
                }
//            propagate(this);
                if (sum(right) == 0) {
                    return left.lastZero();
                } else {
                    return right.lastZero();
                }
            }

        }

    }

    static class MyScan {
        BufferedReader br;
        StringTokenizer st;

        MyScan(BufferedReader br) {
            this.br = br;
        }

        public MyScan(InputStream in) {
            this(new BufferedReader(new InputStreamReader(in)));
        }

        public void findToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
        }

        public String next() {
            findToken();
            return st.nextToken();
        }

        public int[] na(int n) {
            int[] k = new int[n];
            for (int i = 0; i < n; i++) {
                k[i] = fi();
            }
            return k;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public int fi() {
            String t = next();
            int cur = 0;
            boolean n = t.charAt(0) == '-';
            for (int a = n ? 1 : 0; a < t.length(); a++) {
                cur = cur * 10 + t.charAt(a) - '0';
            }
            return n ? -cur : cur;
        }

    }
}

