#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int N;
int a[MAXN];
int aux[MAXN];
int main(int argc, char *argv[]) {
  scanf("%d", &N);
  for (int i = 0, _i = N; i < _i; ++i) {
    scanf("%d", a + i);
  }
  aux[N] = 1 << 30;
  for (int i = N - 1; i >= 0; i--) {
    aux[i] = min(aux[i + 1], a[i]);
  }
  for (int i = 0; i < N; i++) {
    int lo = i, hi = N;
    while (lo < hi) {
      int mid = (lo + hi + 1) / 2;
      if (aux[mid] < a[i]) {
        lo = mid;
      } else {
        hi = mid - 1;
      }
    }
    if (aux[lo] < a[i] && aux[lo + 1] >= a[i]) {
      printf("%d\n", lo - i - 1);
    } else {
      printf("-1\n");
    }
  }
  return 0;
}
