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.util.*;
import java.io.*;
public class TillICollapse {
    
    
    
    /************************ SOLUTION STARTS HERE ************************/
    static class SegTreeNode {
        int size;
        SegTreeNode left , right;
        public SegTreeNode(int size) {
            this.size = size;
        }
        
        @Override
        public String toString() {
            return String.format("[sz = %d]", size);
        }
    }
    
    static SegTreeNode persistent[];
    static int arr[] , last[];
    static SegTreeNode initSegTree(int L , int R) {
        if(L == R)
            return new SegTreeNode(last[arr[L]] == L ? 1 : 0);
        else {
            SegTreeNode newNode = new SegTreeNode(0);
            int mid = (L + R) >> 1;
            newNode.left = initSegTree(L, mid);
            newNode.right = initSegTree(mid + 1, R);
            newNode.size = newNode.left.size + newNode.right.size;
            return newNode;
        }
    }
    static SegTreeNode initSegTree(SegTreeNode prev , int L , int R , int index , int val) {
        if(L == R) 
            return new SegTreeNode(val);
        else {
            int mid = (L + R) >> 1;
            SegTreeNode l = prev.left;
            SegTreeNode r = prev.right;
            if(index <= mid)
                l = initSegTree(prev.left , L , mid , index , val);
            else
                r = initSegTree(prev.right, mid + 1, R, index , val);
            SegTreeNode newNode = new SegTreeNode(l.size + r.size);
            newNode.left = l;
            newNode.right = r;
            return newNode;
        }
    }
    static int sz(SegTreeNode n) {
        return n == null ? 0 : n.size;
    }
    static int selection(SegTreeNode root , int k , int l , int r) {
        int sel = -1;
        while(l <= r && root != null) {
            int m = (l + r) >> 1;
            if(k >= sz(root.left)) {
                k -= sz(root.left);
                l = m + 1;
                sel = m;
                root = root.right;
            }
            else {
                r = m;
                root = root.left;
            }
        }
        return sel;
    }
    
    static void print(SegTreeNode root , int l , int r) {
        System.out.println("l " + l + " r " + r + " sz " + root.size + " " + (l == r ? "*" : ""));
        if(l < r) {
            int m = (l + r) >> 1;
            print(root.left, l, m);
            print(root.right , m + 1 , r);
        }
    }
    
    private static void solve() {
        
        int n = nextInt();
        arr = Arrays.copyOf(nextIntArray(n), n + 1);    // small trick so that selection works properly
        n++;                                            // having a distinct number at the last
        last = new int[n + 1];
        int next[] = new int[n];
        Arrays.fill(last, n);
        for(int i = n - 1; i >= 0; i--) {
            next[i] = last[arr[i]];
            last[arr[i]] = i;
        }
        
        persistent = new SegTreeNode[n];
        persistent[0] = initSegTree(0, n - 1);
//        System.out.println("next " + Arrays.toString(next));
//        print(persistent[0], 0, n - 1);
        for(int i = 1; i < n; i++) {
//            System.out.println("tree " + i);
            persistent[i] = initSegTree(persistent[i - 1], 0, n - 1, i - 1, 0);
            if(next[i - 1] < n)
                persistent[i] = initSegTree(persistent[i], 0, n - 1, next[i - 1], 1);
//             print(persistent[i], 0, n - 1); // evil print (I commented the print there !! LOL)
        }
        
        for(int k = 1; k < n; k++) {
            int cnt = 0;
//            System.out.println("k " + k);
            int ptr = 0;
            while(ptr < n - 1) {
                cnt++;
//                System.out.print("from " + ptr);
                ptr = selection(persistent[ptr], k, 0, n - 1);
//                System.out.println(" to " + ptr);
            }
            print(cnt + " ");
        }
    }
    
    
    
    /************************ SOLUTION ENDS HERE ************************/
    
    
    
    
    
    /************************ TEMPLATE STARTS HERE **********************/
    
    public static void main(String[] args) throws IOException {
        reader = new BufferedReader(new InputStreamReader(System.in));
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), false);
        st     = null;
        solve();
        reader.close();
        writer.close();
    }
    
    static BufferedReader reader;
    static PrintWriter    writer;
    static StringTokenizer st;
    
    static String next()
    {while(st == null || !st.hasMoreTokens()){try{String line = reader.readLine();if(line == null){return null;}            
    st = new StringTokenizer(line);}catch (Exception e){throw new RuntimeException();}}return st.nextToken();}
    static String nextLine()  {String s=null;try{s=reader.readLine();}catch(IOException e){e.printStackTrace();}return s;}             
    static int    nextInt()   {return Integer.parseInt(next());}
    static long   nextLong()  {return Long.parseLong(next());}     
    static double nextDouble(){return Double.parseDouble(next());}
    static char   nextChar()  {return next().charAt(0);}
    static int[]  nextIntArray(int n)         {int[] a= new int[n];   int i=0;while(i<n){a[i++]=nextInt();}  return a;}
    static long[] nextLongArray(int n)        {long[]a= new long[n];  int i=0;while(i<n){a[i++]=nextLong();} return a;}    
    static int[]  nextIntArrayOneBased(int n) {int[] a= new int[n+1]; int i=1;while(i<=n){a[i++]=nextInt();} return a;}            
    static long[] nextLongArrayOneBased(int n){long[]a= new long[n+1];int i=1;while(i<=n){a[i++]=nextLong();}return a;}            
    static void   print(Object o)  { writer.print(o);  }
    static void   println(Object o){ writer.println(o);}
    
    /************************ TEMPLATE ENDS HERE ************************/
    
}