#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
inline double Time() { return ((clock() * 1.0) / CLOCKS_PER_SEC); }
const int N = 100500;
int a[N], ans[N], n, t[N * 6], was[N];
struct qwe {
  int x;
  int p, k;
};
qwe V[N];
bool cmp1(qwe p1, qwe p2) { return p1.x < p2.x; }
bool cmp2(qwe p1, qwe p2) { return p1.p < p2.p; }
void compress() {
  for (int i = 1; i <= n; i++) {
    V[i].x = a[i];
    V[i].p = i;
  }
  sort(V + 1, V + 1 + n, cmp1);
  int cur = 0;
  V[0].x = -1;
  for (int i = 1; i <= n; i++) {
    if (V[i].x != V[i - 1].x) {
      V[i].k = ++cur;
    } else {
      V[i].k = cur;
    }
  }
  sort(V + 1, V + 1 + n, cmp2);
  for (int i = 1; i <= n; i++) {
    a[i] = V[i].k;
  }
}
void update(int v, int L, int R, int pos, int x) {
  if (L > R) {
    return;
  }
  if (L == R) {
    t[v] = x;
    return;
  }
  int mid = (L + R) / 2;
  if (mid >= pos)
    update(v * 2, L, mid, pos, x);
  else
    update(v * 2 + 1, mid + 1, R, pos, x);
  t[v] = max(t[v * 2], t[v * 2 + 1]);
}
int _find(int v, int L, int R, int l, int r) {
  if (L > R || l > r) {
    return -inf;
  }
  if (L == l && R == r) {
    return t[v];
  }
  int mid = (L + R) / 2;
  return max(_find(v * 2, L, mid, l, min(mid, r)),
             _find(v * 2 + 1, mid + 1, R, max(l, mid + 1), r));
}
int main() {
  srand(time(NULL));
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  compress();
  for (int i = n; i >= 1; i--) {
    ans[i] = max(-1, (_find(1, 1, 100000, 1, a[i] - 1) - i - 1));
    if (!was[a[i]]) update(1, 1, 100000, a[i], i), was[a[i]] = 1;
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
