#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int arr[100005];
  for (int i = 1; i <= n; ++i) scanf("%d", &arr[i]);
  int suff_min[100005];
  suff_min[n] = arr[n];
  for (int i = n - 1; i >= 1; --i) suff_min[i] = min(suff_min[i + 1], arr[i]);
  for (int i = 1; i <= n; ++i)
    if (i == n || suff_min[i + 1] >= arr[i])
      printf("-1 ");
    else {
      int lb = i + 1, rb = n;
      while (rb - lb > 1) {
        int mb = (lb + rb) / 2;
        if (suff_min[mb] < arr[i])
          lb = mb;
        else
          rb = mb;
      }
      int res = -1;
      for (int j = min(n, lb + 2); j >= lb - 2; --j)
        if (j > i && suff_min[j] < arr[i]) {
          res = j - i - 1;
          break;
        }
      printf("%d ", res);
    }
  return 0;
}
