#include <bits/stdc++.h>
using namespace std;
int n, a[100001], b[100001];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) cin >> a[i];
  b[n - 1] = a[n - 1];
  for (int i = n - 2; i >= 0; i--) b[i] = min(b[i + 1], a[i]);
  for (int i = 0; i < n - 1; i++) {
    int l = i + 1;
    int r = n - 1;
    while (r - l > 1) {
      int m = (l + r) / 2;
      if (b[m] >= a[i])
        r = m;
      else
        l = m;
    }
    if (b[r] < a[i])
      printf("%d ", r - i - 1);
    else if (b[l] < a[i])
      printf("%d ", l - i - 1);
    else
      printf("-1 ");
  }
  printf("-1");
  return 0;
}
