#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, a[N], b[N], c[N], ans[N];
void update(int x, int val) {
  while (x < N) c[x] = max(c[x], val), x += x & -x;
}
int query(int x) {
  int t = 0;
  while (x) t = max(t, c[x]), x -= x & -x;
  return t;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    b[i] = a[i];
  }
  sort(b + 1, b + n + 1);
  int m = unique(b + 1, b + n + 1) - (b + 1);
  for (int i = 1; i <= n; i++) a[i] = lower_bound(b + 1, b + m + 1, a[i]) - b;
  for (int i = n; i; i--) {
    update(a[i], i);
    int pos = query(a[i] - 1);
    if (!pos)
      ans[i] = -1;
    else
      ans[i] = pos - i - 1;
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
