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.util.*;
import java.io.*;
public class C75D{
    static BufferedReader br;
    public static void main(String args[])throws Exception{
        br=new BufferedReader(new InputStreamReader(System.in));
        int n=toInt();
        long nm[]=toLongArray();
        long nums[][]=new long[n][2];
        for(int i=0;i<nm.length;i++){
            nums[i][0]=nm[i];
            nums[i][1]=i;
        }
        Arrays.sort(nums, new ArrayColumnComparator(0));

        
        int res[]=new int[n];
        res[(int)nums[0][1]]=-1;
        int maxInd=(int)nums[0][1];  
        for(int i=1;i<n;i++){
            if((int)nums[i][1]<maxInd){
               res[(int)nums[i][1]]=maxInd-(int)nums[i][1]-1;
            }
            else{
               maxInd=(int)nums[i][1];
               res[(int)nums[i][1]]=-1;
            }

        }
        for(int i=0;i<n-1;i++){
            System.out.print(res[i]+" ");
        }
        System.out.println(res[n-1]);
    }


    /****************************************************************/
    public static int[] toIntArray()throws Exception{
       String str[]=br.readLine().split(" ");
       int k[]=new int[str.length];
       for(int i=0;i<str.length;i++){
            k[i]=Integer.parseInt(str[i]);
       }
       return k;
    }
    public static int toInt()throws Exception{
       return Integer.parseInt(br.readLine());
    }
    public static long[] toLongArray()throws Exception{
       String str[]=br.readLine().split(" ");
       long k[]=new long[str.length];
       for(int i=0;i<str.length;i++){
            k[i]=Long.parseLong(str[i]);
       }
       return k;
    }
    public static long toLong()throws Exception{
       return Long.parseLong(br.readLine());
    }
    public static double[] toDoubleArray()throws Exception{
       String str[]=br.readLine().split(" ");
       double k[]=new double[str.length];
       for(int i=0;i<str.length;i++){
            k[i]=Double.parseDouble(str[i]);
       }
       return k;
    }
    public static double toDouble()throws Exception{
       return Double.parseDouble(br.readLine());
    }
    public static String toStr()throws Exception{
       return br.readLine();
    }
    public static String[] toStrArray()throws Exception{
       String str[]=br.readLine().split(" ");
       return str;
    }
    /****************************************************************/

}
class ArrayColumnComparator implements Comparator {
    private int cm = 0;
    ArrayColumnComparator(int cm) {
        this.cm = cm;
    }
    public int compare(Object o1, Object o2) {
        long[] row1 = (long[])o1;
        long[] row2 = (long[])o2;
        int i;
        if (row1[cm]>row2[cm])
            i=1;
        else if(row1[cm]<row2[cm])
            i=-1;
        else i=0;
        return i;
    }
}