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.*;
import java.util.*;
import java.math.*;

public final class pers
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	static Random rnd=new Random();
	static int[] val,left,right;
	static int SZ=(int)(4e6);
	static ArrayList<Integer>[] al;
	static int[] root;
	static Map<Integer,Integer> m1=new HashMap<>();
	static int cnt=0;
	static int[] a,last;
	static int n;
	
	static int build(int node,int s,int e)
	{
		cnt=Math.max(cnt,node);
		
		if(s==e)
		{
			val[node]=last[s]==0?1:0;
			
			return node;
		}
		
		else
		{
			int mid=(s+e)>>1;
			
			left[node]=build(node<<1,s,mid);right[node]=build(node<<1|1,mid+1,e);
			
			val[node]=val[left[node]]+val[right[node]];
			
			return node;
		}
	}
	
	static int add(int last,int s,int e,int x,int curr)
	{
		if(s==e)
		{
			++cnt;
			
			val[cnt]=val[last]+curr;
			
			return cnt;
		}
		
		else
		{
			int mid=(s+e)>>1;
			
			if(x<=mid)
			{
				++cnt;int curr_node=cnt;
				
				right[curr_node]=right[last];
				
				left[curr_node]=add(left[last],s,mid,x,curr);
				
				val[curr_node]=val[left[curr_node]]+val[right[curr_node]];
				
				return curr_node;
			}
			
			else
			{
				++cnt;int curr_node=cnt;
				
				left[curr_node]=left[last];
				
				right[curr_node]=add(right[last],mid+1,e,x,curr);
				
				val[curr_node]=val[left[curr_node]]+val[right[curr_node]];
				
				return curr_node;
			}
		}
	}
	
	static int find(int node,int s,int e,int k)
	{
		if(s==e)
		{
			return s;
		}
		
		else
		{
			int mid=(s+e)>>1;
			
			if(val[left[node]]>=k)
			{
				return find(left[node],s,mid,k);
			}
			else
			{
				return find(right[node],mid+1,e,k-val[left[node]]);
			}
		}
	}
	
	static int solve(int k)
	{
		int ret=0;
		
		for(int i=1;i<=n;)
		{
			ret++;
			
			int next=find(root[i-1],1,n+1,i-1+k+1);
			
			//out.println(k+" "+i+" "+next);
			
			i=next;
		}
		
		return ret;
	}
	
    public static void main(String args[]) throws Exception
    {
		n=sc.nextInt();a=new int[n+1];last=new int[n+2];al=new ArrayList[n+1];
		
		for(int i=0;i<=n;i++)
		{
			al[i]=new ArrayList<Integer>();
		}
		
		for(int i=1;i<=n;i++)
		{
			a[i]=sc.nextInt();
			
			last[i]=m1.getOrDefault(a[i],0);
			
			al[last[i]].add(i);
			
			m1.put(a[i],i);
		}
		
		root=new int[n+1];val=new int[SZ];left=new int[SZ];right=new int[SZ];
		
		root[0]=build(1,1,n+1);
		
		for(int i=1;i<=n;i++)
		{
			root[i]=root[i-1];
			
			for(int x:al[i])
			{
				root[i]=add(root[i],1,n+1,x,1);
			}
		}
		
		for(int i=1;i<=n;i++)
		{
			out.print(solve(i)+" ");
		}
		
		out.println("");out.close();
    }
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}