#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const long long mxN = 1e6 + 1;
void fileio() {}
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  ;
  vector<long long> mn(n);
  mn[n - 1] = a[n - 1];
  for (long long i = n - 2; i >= 0; i--) mn[i] = min(mn[i + 1], a[i]);
  vector<long long> res(n, -1);
  for (long long i = 0; i < n; i++) {
    long long l = i + 1, r = n - 1;
    while (l <= r) {
      long long m = (l + r) / 2;
      if (mn[m] < a[i]) {
        res[i] = m - i - 1;
        l = m + 1;
      } else
        r = m - 1;
    }
  }
  for (long long i = 0; i < res.size(); i++) cout << res[i] << " ";
  cout << "\n";
  ;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  fileio();
  solve();
}
