#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 1e5 + 10;
struct SegTree {
  int Min[maxn << 2];
  void push_up(int rt) { Min[rt] = min(Min[rt << 1], Min[rt << 1 | 1]); }
  void build(int l, int r, int rt) {
    if (l == r) {
      Min[rt] = INF;
      return;
    }
    int mid = (l + r) >> 1;
    build(l, mid, rt << 1);
    build(mid + 1, r, rt << 1 | 1);
    push_up(rt);
  }
  void update(int pos, int val, int l, int r, int rt) {
    if (l == r) {
      Min[rt] = val;
      return;
    }
    int mid = (l + r) >> 1;
    if (pos <= mid)
      update(pos, val, l, mid, rt << 1);
    else
      update(pos, val, mid + 1, r, rt << 1 | 1);
    push_up(rt);
  }
  int query(int val, int l, int r, int rt) {
    if (l == r) return l;
    int mid = (l + r) >> 1;
    if (Min[rt << 1] < val) return query(val, l, mid, rt << 1);
    if (Min[rt << 1 | 1] < val) return query(val, mid + 1, r, rt << 1 | 1);
  }
} seg;
int n, arr[maxn], ans[maxn];
int main() {
  while (~scanf("%d", &n)) {
    seg.build(1, n, 1);
    for (int i = n; i >= 1; i--) scanf("%d", &arr[i]);
    for (int i = 1; i <= n; i++) {
      if (seg.Min[1] >= arr[i]) {
        ans[i] = -1;
      } else {
        ans[i] = i - seg.query(arr[i], 1, n, 1) - 1;
      }
      seg.update(i, arr[i], 1, n, 1);
    }
    for (int i = n; i > 1; i--) printf("%d ", ans[i]);
    printf("%d\n", ans[1]);
  }
  return 0;
}
