#include <bits/stdc++.h>
using namespace std;
int n;
vector<long long> a, r, mn;
vector<long long>::iterator it;
int main() {
  cin >> n;
  a.resize(n), r.resize(n), mn.resize(n);
  for (int i = 0; i < n; i++) cin >> a[n - 1 - i];
  mn[0] = a[0];
  for (int i = 1; i < n; i++) mn[i] = min(mn[i - 1], a[i]);
  reverse(mn.begin(), mn.end());
  for (int i = 0; i < n; i++) {
    int from = n - i - 1, j;
    it = lower_bound(mn.begin() + from, mn.end(), a[i]);
    j = it - mn.begin();
    if (it == mn.end())
      r[i] = n - from - 2;
    else {
      if (j == from)
        r[i] = -1;
      else
        r[i] = j - from - 2;
    }
  }
  for (int i = n - 1; i >= 0; i--) cout << r[i] << ' ';
  return 0;
}
