#include <bits/stdc++.h>
int dat[100001], n;
int get[100001], head;
int pl[100001];
int pr[100001];
int find_less(int x) {
  int s, e, r;
  s = 0;
  e = head - 1;
  while (s <= e) {
    int m = (s + e) / 2;
    if (get[m] < x)
      e = m - 1;
    else
      s = m + 1;
  }
  return e + 1;
}
int main() {
  scanf("%d", &n);
  int i;
  head = 0;
  for (i = 0; i < n; i++) scanf("%d", &dat[i]);
  for (i = n - 1; i >= 0; i--) {
    if (head == 0 || get[head - 1] >= dat[i]) {
      pr[i] = -1;
      if (head != 0 && get[head - 1] == dat[i]) continue;
      get[head] = dat[i];
      pl[head] = i;
      head++;
    } else {
      pr[i] = pl[find_less(dat[i])] - i - 1;
    }
  }
  for (i = 0; i < n; i++) printf("%d ", pr[i]);
  return 0;
}
