#include <bits/stdc++.h>
using namespace std;
int n;
int a[100010];
int tree[100010 << 2];
int ret[100010];
void push_up(int rt) { tree[rt] = min(tree[rt << 1], tree[rt << 1 | 1]); }
void build(int left, int right, int rt) {
  if (left == right) {
    tree[rt] = a[left];
    return;
  }
  int mid = (left + right) >> 1;
  build(left, mid, rt << 1);
  build(mid + 1, right, rt << 1 | 1);
  push_up(rt);
}
void query(int k, int left, int right, int rt) {
  if (left == right && a[left] < a[k]) {
    ret[k] = left - k - 1;
    return;
  }
  int mid = (left + right) >> 1;
  if (a[k] > tree[rt << 1 | 1]) {
    query(k, mid + 1, right, rt << 1 | 1);
  } else if (a[k] > tree[rt << 1]) {
    query(k, left, mid, rt << 1);
  } else {
    ret[k] = -1;
    return;
  }
}
int main() {
  ios::sync_with_stdio(false);
  while (cin >> n) {
    for (int i = 1; i <= n; i++) cin >> a[i];
    build(1, n, 1);
    for (int i = 1; i <= n; i++) {
      query(i, 1, n, 1);
      if (ret[i] < 0) ret[i] = -1;
      if (i != n)
        cout << ret[i] << " ";
      else
        cout << ret[i] << endl;
    }
  }
}
