#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long n;
pair<long long, long long> a[N], b[N];
long long st[4 * N];
void build(long long p, long long l, long long r) {
  if (l == r) {
    st[p] = b[l].second;
    return;
  }
  long long mid = (l + r) / 2;
  build(p * 2, l, mid);
  build(p * 2 + 1ll, mid + 1ll, r);
  st[p] = max(st[p * 2], st[p * 2 + 1ll]);
}
long long rmq(long long p, long long l, long long r, long long S, long long E) {
  if (l >= S && r <= E) return st[p];
  if (l > E || r < S) return 0ll;
  long long mid = (l + r) / 2ll;
  long long x = rmq(p * 2ll, l, mid, S, E);
  long long y = rmq(p * 2ll + 1ll, mid + 1ll, r, S, E);
  return max(x, y);
}
void solve(pair<long long, long long> x) {
  long long val = x.first;
  long long indx = x.second;
  long long r = lower_bound(b, b + n, make_pair(val, -1ll)) - b;
  long long dx = rmq(1ll, 1ll, n, 1, r);
  if (dx > indx)
    printf("%d ", dx - indx - 1ll);
  else
    printf("-1 ");
}
int main() {
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &a[i].first);
    a[i].second = i;
    b[i] = a[i];
  }
  sort(b + 1, b + n + 1);
  build(1, 1, n);
  for (int i = 1; i <= n; i++) solve(a[i]);
}
