#include <bits/stdc++.h>
using namespace std;
const long long N = 100005;
char en = '\n';
long long inf = 1e16;
long long mod = 1000000007;
long long power(long long x, long long n, long long mod) {
  long long res = 1;
  x %= mod;
  while (n) {
    if (n & 1) res = (res * x) % mod;
    x = (x * x) % mod;
    n >>= 1;
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long arr[n + 5];
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  vector<long long> val;
  vector<long long> indx;
  vector<long long> res;
  for (long long i = n; i >= 1; i--) {
    long long indx2 =
        upper_bound(val.begin(), val.end(), arr[i], greater<long long>()) -
        val.begin();
    if (indx2 == val.size()) {
      res.push_back(-1);
    } else {
      res.push_back(indx[indx2] - i - 1);
    }
    if (val.size() == 0) {
      val.push_back(arr[i]);
      indx.push_back(i);
    } else {
      if (val[val.size() - 1] > arr[i]) {
        val.push_back(arr[i]);
        indx.push_back(i);
      }
    }
  }
  reverse(res.begin(), res.end());
  for (long long x : res) cout << x << " ";
  cout << en;
  return 0;
}
