#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 9;
const long long N = 500500;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  map<long long, long long> mp;
  vector<long long> ans(n);
  deque<pair<long long, long long> > dq;
  dq.push_front({a[n - 1], n - 1});
  ans[n - 1] = -1;
  for (long long i = n - 2; i >= 0; i--) {
    auto it = lower_bound((dq).begin(), (dq).end(), make_pair(a[i], -INF));
    if (it != dq.begin()) {
      it--;
      ans[i] = it->second - i - 1;
    } else {
      ans[i] = -1;
      if (a[i] < dq[0].first) {
        dq.push_front({a[i], i});
      }
    }
  }
  for (long long i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
