#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 * 100 + 1234;
int f[maxn];
int a[maxn];
int b[maxn];
int res[maxn];
int main() {
  int n;
  scanf("%d", &n);
  memset(f, -1, sizeof f);
  for (int i = 0; i < (n); i++) scanf("%d", &a[i]), b[i] = a[i];
  b[n] = -1;
  sort(b, b + n + 1);
  for (int i = n - 1; i >= 0; i--) {
    int id = lower_bound(b, b + n + 1, a[i]) - b;
    for (int j = id; j < maxn; j += j & -j) f[j] = max(f[j], i);
    res[i] = -1;
    for (int j = id - 1; j > 0; j -= j & -j) res[i] = max(res[i], f[j]);
    if (res[i] != -1) {
      res[i] -= i + 1;
    }
  }
  for (int i = 0; i < n; i++) printf("%d%c", res[i], " \n"[i + 1 == n]);
  return 0;
}
