#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 9;
const int M = 1e5 + 9;
int tree[N << 2];
int a[N];
int n, m, s, t;
int read() {
  int f = 1, x = 0;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = (x << 1) + (x << 3) + (s ^ '0');
    s = getchar();
  }
  return f * x;
}
void update(int rt) {
  tree[rt] = min(tree[(rt << 1)], tree[(rt << 1 | 1)]);
  return;
}
void build(int rt, int l, int r) {
  if (l == r) {
    tree[rt] = a[l];
    return;
  }
  int mid = (l + r) >> 1;
  build((rt << 1), l, mid);
  build((rt << 1 | 1), mid + 1, r);
  update(rt);
}
int query(int rt, int l, int r, int L, int R, int val) {
  if (l > R || r < L) return -1;
  if (tree[rt] >= val) return -1;
  if (l == r) return l;
  int mid = (l + r) >> 1;
  int k = query((rt << 1 | 1), mid + 1, r, L, R, val);
  if (k != -1)
    return k;
  else
    return query((rt << 1), l, mid, L, R, val);
}
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) a[i] = read();
  build(1, 1, n);
  for (int i = 1; i <= n; i++) {
    int sp = query(1, 1, n, i, n, a[i]);
    if (sp == -1)
      printf("-1 ");
    else
      printf("%d ", sp - i - 1);
  }
  return 0;
}
