#include <bits/stdc++.h>
int min(int a, int b) { return a < b ? a : b; }
int main() {
  int n, i;
  scanf("%d", &n);
  int a[n], minm[n], ans[n];
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  minm[n - 1] = a[n - 1];
  for (i = n - 2; i >= 0; i--) {
    minm[i] = min(minm[i + 1], a[i]);
  }
  ans[n - 1] = -1;
  for (i = n - 2; i >= 0; i--) {
    if (minm[i + 1] >= a[i]) {
      ans[i] = -1;
      continue;
    }
    int low = i + 1, high = n - 1, mid;
    while (high > low + 1) {
      mid = (low + high) / 2;
      if (minm[mid] >= a[i])
        high = mid - 1;
      else
        low = mid;
    }
    if (minm[high] < a[i])
      ans[i] = high - i - 1;
    else
      ans[i] = low - i - 1;
  }
  for (i = 0; i < n; i++) printf("%d\t", ans[i]);
  return 0;
}
