There are n walruses standing in a queue in an airport. They are numbered starting from the queue's tail: the 1-st walrus stands at the end of the queue and the n-th walrus stands at the beginning of the queue. The i-th walrus has the age equal to ai.

The i-th walrus becomes displeased if there's a younger walrus standing in front of him, that is, if exists such j (i < j), that ai > aj. The displeasure of the i-th walrus is equal to the number of walruses between him and the furthest walrus ahead of him, which is younger than the i-th one. That is, the further that young walrus stands from him, the stronger the displeasure is.

The airport manager asked you to count for each of n walruses in the queue his displeasure.

Input

The first line contains an integer n (2 ≤ n ≤ 105) — the number of walruses in the queue. The second line contains integers ai (1 ≤ ai ≤ 109).

Note that some walruses can have the same age but for the displeasure to emerge the walrus that is closer to the head of the queue needs to be strictly younger than the other one.

Output

Print n numbers: if the i-th walrus is pleased with everything, print "-1" (without the quotes). Otherwise, print the i-th walrus's displeasure: the number of other walruses that stand between him and the furthest from him younger walrus.

Examples

Input

6
10 8 5 3 50 45


Output

2 1 0 -1 0 -1 

Input

7
10 4 6 3 2 8 15


Output

4 2 1 0 -1 -1 -1 

Input

5
10 3 1 10 11


Output

1 0 -1 -1 -1 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;


public class Queue {
	
	ArrayList<Warlus> queue = new ArrayList<Warlus>();
	ArrayList<Warlus> queueSorted = new ArrayList<Warlus>();
	
	int n;
	StringBuffer output = new StringBuffer();
	long res[];
	
	/**
	 * @param args
	 * @throws IOException 
	 * @throws NumberFormatException 
	 */
	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		Queue task = new Queue();
		task.getData();
		task.solution();

	}
	
	private void getData() throws NumberFormatException, IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		n = Integer.parseInt(br.readLine());
		
		String str = br.readLine();
		String[] ages = str.split("\\s");
		Warlus w;
		for(int i=0;i<n;i++){
			w = new Warlus(i,Integer.parseInt(ages[i]));
			queue.add(w);
		//	queueSorted.add(w);
			
		}
		//Collections.sort(queueSorted);
	}
	
	private void solution(){
		Warlus current;
		res = new long[queue.size()];
		Collections.sort(queue);
		long min = queue.get(0).getI();
		long minage = queue.get(0).getA();
		res[queue.get(0).getI()] = -1;
		long absmin = min;
		long absminage = minage;
		for(int i=1;i<queue.size();i++){
			
			
			if(queue.get(i).getI()<absmin){
				res[queue.get(i).getI()] = Math.abs(queue.get(i).getI()-absmin)-1;
			}else{
				res[queue.get(i).getI()] = -1;
			}
			if(queue.get(i).getI()>absmin){
				absmin = queue.get(i).getI();
			}
			
			
		}
		
		for(int i=0;i<res.length;i++){
			System.out.print(res[i]+ " ");
		}
		//System.out.print(output.toString());
		
		
	}
	
	
	private class Warlus implements Comparable<Warlus>{
		private int i;
		

		private long a;
		private long d = -1;//dissatisfaction
		
		Warlus(int i, long a){
			this.i = i;
			this.a = a;
			
		}
		
		public void setD(long d){
			this.d = d;
		}
		
		public int getI() {
			return i;
		}

		public long getA() {
			return a;
		}

		public long getD() {
			return d;
		}

		@Override
		public int compareTo(Warlus w) {
			// TODO Auto-generated method stub
			return (int) (this.a  - w.a  );
		}
		
		

		
		
	}
	
	class WarlusComparator implements Comparator<Warlus>{

		@Override
		public int compare(Warlus arg0, Warlus arg1) {
			// TODO Auto-generated method stub
			return arg0.getI()-arg1.getI();
		}
		
	}
}
////#define __ASD__
//
//#include <vector>
//#include <cstring>
//#include <list>
//#include <map>
//#include <set>
//#include <deque>
//#include <stack>
//#include <bitset>
//#include <algorithm>
//#include <functional>
//#include <numeric>
//#include <utility>
//#include <sstream>
//#include <queue>
//#include <iostream>
//#include <iomanip>
//#include <cstdio>
//#include <cmath>
//#include <stdlib.h>
//#include <ctime>
//#include <string>
//#include <complex>
//#ifdef __ASD__
//#include <windows.h>
//#endif
//using namespace std;
//#define all(a) a.begin(),a.end()
//#define forn(i,n) for(int i=0;i<(n);++i)
//#define fornn(i,n) for(i=0;i<(n);++i)
//#define lng long long
//#define SQ(a) ((a)*(a))
//#define forv(i,v) for(int i=0;i<(int)v.size();++i)
//#define mp make_pair
//#define pb push_back
//#define ABS(a) ((a)<0?-(a):(a))
//#define iinf 1000000000
//#define left asdleft
//#define prev asdprev
//#define eps 1e-10
//#define y1 asdy1
//#define y2 asdy2
//#define EQ(a,b) abs((a)-(b))<eps
//#define PI 3.1415926535897932384626433832795
//#define DEG2RAD PI/180
//void mytimer(string task){
//#ifdef __ASD__
//    static LARGE_INTEGER prev;  LARGE_INTEGER cur,freq; QueryPerformanceCounter(&cur);  QueryPerformanceFrequency(&freq);   if(task!="")        cout<<task<<" took "<<(cur.QuadPart-prev.QuadPart)*1.0/freq.QuadPart<<endl; prev=cur;
//#endif
//}
//
//
//bool UDgreater ( const pair<int, int> elem1, const pair<int, int> elem2 )
//{
//    return elem1.first < elem2.first;
//}
//
//int res[100010];
//
//int main(){
//#ifdef __ASD__
//    freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
//#endif
//
//    ios_base::sync_with_stdio(false);
//    int n;
//    cin >> n;
//    vector<pair<int, int>> q;
//    int temp;
//    for (int i=0; i<n; i++)
//    {
//        cin >> temp;
//        q.push_back(pair<int, int>(temp, i));
//    }
//    sort( q.begin( ), q.end( ), UDgreater );
//    int min = q[0].second;
//    int absmin = min;
//    res[q[0].second]=-1;
//    int minage = q[0].first;
//    int absminage = minage;
//    for (int i=1; i<q.size(); i++)
//    {
//        if (q[i].first!=q[i-1].first)
//        {
//            minage=absminage;
//            min=absmin;
//        }
//        if ((min>q[i].second)&&(minage<q[i].first))
//            res[q[i].second]=abs(q[i].second-min)-1;
//        else
//            res[q[i].second]=-1;
//        if (q[i].second>absmin)
//        {
//            absmin=q[i].second;
//            absminage=q[i].first;
//        }
//    }
//    for (int i=0; i<n; i++)
//        cout << res[i] << ' ';
//    return 0;
//}
