#include <bits/stdc++.h>
using namespace std;
struct segtree {
  int l, r;
  int mi;
};
segtree seg[1000000];
int val[100010];
void build(int ind, int l, int r) {
  seg[ind].l = l;
  seg[ind].r = r;
  if (l == r) {
    seg[ind].mi = val[l];
    return;
  }
  int mid = (l + r) >> 1, tmp = ind << 1;
  build(tmp, l, mid);
  build(tmp + 1, mid + 1, r);
  seg[ind].mi = min(seg[tmp].mi, seg[tmp + 1].mi);
}
int downget(int ind, int val) {
  if (seg[ind].mi >= val) return -1;
  if (seg[ind].l == seg[ind].r) {
    return seg[ind].l;
  }
  int tmp = ind << 1;
  if (seg[tmp + 1].mi < val)
    return downget(tmp + 1, val);
  else if (seg[tmp].mi < val)
    downget(tmp, val);
}
int get(int ind, int l, int r, int val) {
  int mid = (seg[ind].l + seg[ind].r) >> 1;
  int tmp = ind << 1;
  if (seg[ind].l >= l && seg[ind].r <= r) return downget(ind, val);
  int a = -1, b = -1;
  if (mid >= l) a = get(tmp, l, r, val);
  if (mid < r) b = get(tmp + 1, l, r, val);
  return max(a, b);
}
int main() {
  int n, i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", val + i);
  build(1, 1, n);
  for (i = 1; i < n; i++) {
    j = get(1, i + 1, n, val[i]);
    if (j == -1)
      printf("%d ", -1);
    else
      printf("%d ", j - i - 1);
  }
  printf("-1\n");
}
