#include <bits/stdc++.h>
using namespace std;
long long n, a[100005], ans[100005];
vector<pair<long long, long long> > p;
int main() {
  cin >> n;
  for (long long i = 1; i <= n; ++i) {
    cin >> a[i];
    p.push_back(make_pair(a[i], i));
  }
  sort(p.begin(), p.end());
  long long m = 0;
  if (!p.empty())
    for (long long i = 0; i <= p.size() - 1; ++i) {
      long long en = i;
      while (en <= n && p[i] == p[en]) en++;
      en--;
      long long val = 0;
      for (long long lp = i; lp <= en; ++lp) {
        val = max(val, p[lp].second);
        if (p[lp].second > m)
          ans[p[lp].second] = -1;
        else
          ans[p[lp].second] = m - p[lp].second - 1;
      }
      m = max(val, m);
    }
  for (long long i = 1; i <= n; ++i) cout << ans[i] << " ";
}
