#include <bits/stdc++.h>
int n, q[100005], bn[100005];
int son, bas, orta;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &q[i]);
  for (int i = n; i >= 1; i--) {
    if (i == n) {
      bn[n] = q[n];
      continue;
    }
    if (q[i] < bn[i + 1])
      bn[i] = q[i];
    else
      bn[i] = bn[i + 1];
  }
  for (int i = 1; i <= n; i++) {
    son = n;
    bas = i;
    while (son != bas) {
      orta = (son + bas + 1) / 2;
      if (bn[orta] < q[i])
        bas = orta;
      else
        son = orta - 1;
    }
    printf("%d ", bas - i - 1);
  }
}
