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