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.*;

public class Main{
	static int minN,maxN;
		
	static class treeNode{
		int val;
		treeNode left,right;
		treeNode(int vals){
			val=vals;
		}
		treeNode(treeNode l,treeNode r){
			left=l;
			right=r;
			val=0;
			if(left!=null) {
				val+=left.val;
			}
			if(right!=null) {
				val+=right.val;
			}
		}
	}
	static treeNode updatePoint(int idx,int val,treeNode root) {
		return updatePoint(root, minN, maxN, idx,val);
	}
	static treeNode updatePoint(treeNode node,int curLeft,int curRight,int idx,int val) {
		if(curLeft==curRight) {
			return new treeNode(val);
		}
		int mid=(curLeft+curRight)>>1;
		if(node==null)node=new treeNode(0);
		if(idx<=mid) {
			return new treeNode(updatePoint(node.left, curLeft, mid, idx,val),node.right);
			
		}
		return new treeNode(node.left,updatePoint(node.right, mid+1, curRight, idx,val));
	}
	static int query(treeNode root,int k) {
		if(root.val<=k)return maxN+1;
		return query(root, minN, maxN,k);
	}
	static int query(treeNode node,int curLeft,int curRight,int k) {
		if(curLeft==curRight) {
			return curLeft;
		}
		int mid=(curLeft+curRight)>>1;
		if(node.left==null || node.left.val<=k) {
			return query(node.right, mid+1, curRight, k-(node.left==null?0:node.left.val));
		}
		return query(node.left, curLeft, mid, k);
	}
	
	static void main() throws Exception{
		int n=sc.nextInt();
		int[]in=sc.intArr(n);
		minN=0;maxN=n-1;
		treeNode[]trees=new treeNode[n];
		treeNode cur=new treeNode(0);
		int[]nxtOcc=new int[n+1];
		for(int i=n-1;i>=0;i--) {
			cur=updatePoint(i, 1, cur);
			if(nxtOcc[in[i]]!=0) {
				cur=updatePoint(nxtOcc[in[i]], 0, cur);
			}
			nxtOcc[in[i]]=i;
			trees[i]=cur;
		}
		for(int k=1;k<=n;k++) {
			int curIdx=0;
			int ans=0;
			while(curIdx<n) {
				ans++;
				curIdx=query(trees[curIdx], k);
			}
			pw.print(ans+" ");
		}
		pw.println();
	}
	public static void main(String[] args) throws Exception{
		sc=new MScanner(System.in);
		pw = new PrintWriter(System.out);
		int tc=1;
//		tc=sc.nextInt();
		for(int test=1;test<=tc;test++) {
			main();
		}
		pw.flush();
	}
	static PrintWriter pw;
	static MScanner sc;
	static class MScanner {
		StringTokenizer st;
		BufferedReader br;
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
	 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
	 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public int[] intArr(int n) throws IOException {
	        int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
	        return in;
		}
		public long[] longArr(int n) throws IOException {
	        long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
	        return in;
		}
		public int[] intSortedArr(int n) throws IOException {
	        int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
	        shuffle(in);
	        Arrays.sort(in);
	        return in;
		}
		public long[] longSortedArr(int n) throws IOException {
	        long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
	        shuffle(in);
	        Arrays.sort(in);
	        return in;
		}
		public Integer[] IntegerArr(int n) throws IOException {
	        Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();
	        return in;
		}
		public Long[] LongArr(int n) throws IOException {
	        Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();
	        return in;
		}
		public String nextLine() throws IOException {
			return br.readLine();
		}
	 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
	 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
	 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
	 
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	 
		public boolean ready() throws IOException {
			return br.ready();
		}
	 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
		
	}
	static void shuffle(int[]in) {
		for(int i=0;i<in.length;i++) {
			int idx=(int)(Math.random()*in.length);
			int tmp=in[i];
			in[i]=in[idx];
			in[idx]=tmp;
		}
	}
	static void shuffle(long[]in) {
		for(int i=0;i<in.length;i++) {
			int idx=(int)(Math.random()*in.length);
			long tmp=in[i];
			in[i]=in[idx];
			in[idx]=tmp;
		}
	}
}