#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse4")
using namespace std;
inline long long in() {
  long long x;
  scanf("%lld", &x);
  return x;
}
long long n;
const long long N = 1e5 + 4;
long long a[N];
long long mn[N];
int32_t main() {
  n = in();
  for (long long i = 0; i < n; i++) a[i] = in();
  mn[n - 1] = a[n - 1];
  for (long long i = n - 2; i >= 0; i--) mn[i] = min(a[i], mn[i + 1]);
  long long ans;
  for (long long i = 0; i < n; i++) {
    ans = lower_bound(mn + i, mn + n, a[i]) - mn - 1 - i;
    ans--;
    cout << max(ans, -1LL) << " ";
  }
}
