#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 2000005;
int tr[maxn];
int a[maxn];
int ans[maxn];
int temp;
void build(int x, int l, int r) {
  if (l == r) {
    tr[x] = a[l];
    return;
  }
  int mid = (l + r) / 2;
  build(x * 2, l, mid);
  build(x * 2 + 1, mid + 1, r);
  tr[x] = min(tr[x * 2], tr[x * 2 + 1]);
}
void query(int x, int l, int r, int t) {
  if (l == r) {
    ans[temp++] = l - t - 1;
    return;
  }
  int mid = (l + r) / 2;
  if (tr[x * 2 + 1] < a[t])
    query(x * 2 + 1, mid + 1, r, t);
  else
    query(x * 2, l, mid, t);
}
void update(int x, int l, int r, int t) {
  if (l == r) {
    tr[x] = inf;
    return;
  }
  int mid = (l + r) / 2;
  if (t <= mid) {
    update(x * 2, l, mid, t);
  } else
    update(x * 2 + 1, mid + 1, r, t);
  tr[x] = min(tr[x * 2], tr[x * 2 + 1]);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  build(1, 1, n);
  for (int i = 1; i <= n; i++) {
    if (tr[1] >= a[i])
      ans[temp++] = -1;
    else
      query(1, 1, n, i);
    update(1, 1, n, i);
  }
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
  return 0;
}
