#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3fffffff;
const int SINF = 0x7fffffff;
const long long LINF = 0x3fffffffffffffff;
const long long SLINF = 0x7fffffffffffffff;
const int MAXN = 100007;
struct wT {
  bool operator<(const wT &a) const {
    return ((age ^ a.age) ? (age < a.age) : (id > a.id));
  }
  int id, age;
} wal[MAXN];
class sbtT {
 public:
  sbtT() : kc(0), rt(0) {
    memset(val, 0, sizeof(val));
    memset(size, 0, sizeof(size));
    memset(lc, 0, sizeof(lc));
    memset(rc, 0, sizeof(rc));
  }
  void insert(int nv) { insert(nv, rt); }
  void del(int nv) { del(nv, rt, false); }
  int minval() { return getmin(rt); }
  void print() { print(rt); }

 private:
  void leftrot(int &now) {
    int nl = lc[now];
    lc[now] = rc[nl];
    rc[nl] = now;
    size[now] = size[lc[now]] + size[rc[now]] + 1;
    size[nl] = size[lc[nl]] + size[rc[nl]] + 1;
    now = nl;
  }
  void rightrot(int &now) {
    int nl = rc[now];
    rc[now] = lc[nl];
    lc[nl] = now;
    size[now] = size[lc[now]] + size[rc[now]] + 1;
    size[nl] = size[lc[nl]] + size[rc[nl]] + 1;
    now = nl;
  }
  void insert(int nv, int &now) {
    if (!now) {
      now = ++kc;
      val[now] = nv;
      size[now] = 1;
    } else {
      if (nv < val[now])
        insert(nv, lc[now]), maintain(now, true);
      else if (nv > val[now])
        insert(nv, rc[now]), maintain(now, false);
    }
  }
  int del(int nv, int &now, bool flag) {
    if (!now) return -1;
    if (flag ? (val[now] == nv || (!lc[now] && nv < val[now]) ||
                (!rc[now] && nv > val[now]))
             : (val[now] == nv)) {
      int ret = val[now];
      if (!lc[now] || !rc[now])
        now = lc[now] ^ rc[now];
      else
        val[now] = del(nv, lc[now], true);
      return ret;
    } else {
      if (nv < val[now])
        return del(nv, lc[now], flag);
      else
        return del(nv, rc[now], flag);
    }
  }
  void maintain(int &now, bool flag) {
    if (flag) {
      if (size[lc[lc[now]]] > size[rc[now]])
        leftrot(now);
      else if (size[rc[lc[now]]] > size[rc[now]])
        rightrot(lc[now]), leftrot(now);
      else
        return;
    } else {
      if (size[rc[rc[now]]] > size[lc[now]])
        rightrot(now);
      else if (size[lc[rc[now]]] > size[lc[now]])
        leftrot(rc[now]), rightrot(now);
      return;
    }
    maintain(lc[now], true);
    maintain(rc[now], false);
    maintain(now, true);
    maintain(now, false);
  }
  void print(int now) {
    if (!now) return;
    print(lc[now]);
    printf("%d ", val[now]);
    print(rc[now]);
  }
  int getmin(int now) {
    if (!lc[now])
      return val[now];
    else
      return getmin(lc[now]);
  }
  static const int SBTMAXN = 100007;
  int kc, rt;
  int val[SBTMAXN], size[SBTMAXN], lc[SBTMAXN], rc[SBTMAXN];
} s;
int n;
int ans[MAXN];
void init();
void input();
void work();
int main() {
  init();
  input();
  work();
}
void init() { ios::sync_with_stdio(false); }
void input() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &wal[i].age), wal[i].id = n - i;
}
void work() {
  sort(wal, wal + n);
  s.insert(INF);
  int mini;
  for (int i = 0; i < n; ++i) {
    mini = s.minval();
    if (mini < wal[i].id)
      ans[wal[i].id] = wal[i].id - mini - 1;
    else
      ans[wal[i].id] = -1;
    s.insert(wal[i].id);
  }
  for (int i = n; i > 0; --i) printf("%d ", ans[i]);
  putchar('\n');
}
