#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  long long n;
  cin >> n;
  long long a[n], v[n];
  for (long long i = 0; i < n; i++) cin >> a[i], v[i] = -1;
  set<pair<long long, long long> > s;
  s.insert({a[n - 1], n - 1});
  long long m = a[n - 1];
  for (long long i = n - 2; i >= 0; i--) {
    auto it = s.upper_bound({a[i], -1});
    if (it != s.begin()) {
      it--;
      v[i] = ((*it).second) - i - 1;
    }
    m = min(m, a[i]);
    s.insert({m, i});
  }
  for (long long i = 0; i < n; i++) cout << v[i] << " ";
}
