#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
int a[N];
int s[N << 2];
void build(int k, int l, int r) {
  if (l == r) {
    s[k] = a[l];
    return;
  }
  int mid = l + r >> 1;
  build(k << 1, l, mid);
  build(k << 1 | 1, mid + 1, r);
  s[k] = min(s[k << 1], s[k << 1 | 1]);
}
int ask(int k, int l, int r, int x, int y, int v) {
  if (l == r) {
    if (s[k] < v) {
      return l;
    } else
      return -1;
  }
  int mid = l + r >> 1;
  if (y > mid && s[k << 1 | 1] < v) {
    return ask(k << 1 | 1, mid + 1, r, x, y, v);
  } else if (x <= mid) {
    return ask(k << 1, l, mid, x, y, v);
  }
  return -1;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
  }
  build(1, 1, n);
  int tt;
  for (int i = 1; i <= n; i++) {
    tt = ask(1, 1, n, i + 1, n, a[i]);
    if (tt >= 0) {
      printf("%d ", tt - i - 1);
    } else
      printf("-1 ");
  }
  printf("\n");
  return 0;
}
