#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  int mini[n];
  int rez[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  mini[n - 1] = a[n - 1];
  rez[n - 1] = -1;
  for (int i = n - 2; i >= 0; i--) {
    mini[i] = min(mini[i + 1], a[i]);
  }
  for (int i = n - 2; i >= 0; i--) {
    int l = i;
    int r = n;
    int t = -1;
    while (l < r) {
      int m = (l + r) / 2;
      if (mini[m] < a[i]) {
        l = m + 1;
        t = max(t, m);
      } else {
        r = m;
      }
    }
    if (t == -1) {
      rez[i] = -1;
    } else {
      rez[i] = (t - i - 1);
    }
  }
  for (int i = 0; i < n; i++) {
    cout << rez[i] << ' ';
  }
  return 0;
}
