#include <bits/stdc++.h>
using namespace std;
struct T {
  int l, r, x;
} a[511111];
int b[511111], n, l, r, md, m;
void ful(int id, int l, int r) {
  if (l > r) return;
  a[id].l = l, a[id].r = r;
  if (l == r) {
    a[id].x = b[l];
    return;
  }
  ful(id << 1, l, (l + r) >> 1);
  ful((id << 1) + 1, ((l + r) >> 1) + 1, r);
  a[id].x = ((a[id << 1].x) < (a[(id << 1) + 1].x) ? (a[id << 1].x)
                                                   : (a[(id << 1) + 1].x));
}
void find(int id, int l, int r) {
  if (l > r) return;
  if (a[id].l == l && a[id].r == r) {
    m = ((m) < (a[id].x) ? (m) : (a[id].x));
    return;
  }
  find(id << 1, ((l) > (a[id << 1].l) ? (l) : (a[id << 1].l)),
       ((r) < (a[id << 1].r) ? (r) : (a[id << 1].r)));
  find((id << 1) + 1, ((l) > (a[(id << 1) + 1].l) ? (l) : (a[(id << 1) + 1].l)),
       ((r) < (a[(id << 1) + 1].r) ? (r) : (a[(id << 1) + 1].r)));
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  b[++n] = INT_MAX;
  ful(1, 1, n);
  for (int i = 1; i < n; i++) {
    if (i == n - 1) {
      puts("-1");
      break;
    }
    l = i + 1, r = n;
    while (r - l > 1) {
      m = INT_MAX;
      md = (l + r) >> 1;
      find(1, md, n);
      if (m < b[i])
        l = md;
      else
        r = md;
    }
    if (b[l] >= b[i])
      printf("-1 ");
    else
      printf("%d ", l - i - 1);
  }
  return 0;
}
