#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 2;
const double eps = 1e-8;
const double pi = acos(-1.0);
const int mn = 100005;
int ans[mn], maxv;
int a[mn], b[mn];
int pn;
map<int, int> pos;
int T[mn];
void update(int x, int v) {
  while (x <= pn) {
    if (v > T[x]) T[x] = v;
    x += x & -x;
  }
}
int query(int x) {
  int r = 0;
  while (x > 0) {
    if (T[x] > r) r = T[x];
    x -= x & -x;
  }
  return r;
}
int main(int argc, char **argv) {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    b[i] = a[i];
  }
  sort(b + 1, b + 1 + n);
  pn = unique(b + 1, b + 1 + n) - b - 1;
  for (int i = 1; i <= pn; ++i) pos[b[i]] = i;
  for (int i = n; i >= 1; --i) {
    int p = pos[a[i]];
    int q = query(p - 1);
    ans[i] = q ? q - i - 1 : -1;
    update(p, i);
  }
  for (int i = 1; i <= n; ++i) {
    if (i != 1) putchar(' ');
    printf("%d", ans[i]);
  }
  return 0;
}
