#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> v(n);
  int i, var;
  for (i = 0; i < n; i++) {
    scanf("%d", &var);
    v[i] = var;
  }
  vector<pair<int, int> > stk;
  vector<int> ans(n);
  for (i = v.size() - 1; i >= 0; i--) {
    if (stk.size() == 0) {
      pair<int, int> p;
      p.first = v[i];
      p.second = i;
      stk.push_back(p);
      ans[i] = -1;
    } else {
      if (v[i] <= stk[stk.size() - 1].first) {
        pair<int, int> p;
        p.first = v[i];
        p.second = i;
        stk.push_back(p);
        ans[i] = -1;
      } else {
        int l = 0;
        int h = stk.size() - 1;
        int mid = (l + h) / 2;
        int index;
        while (h - l > 1) {
          mid = (l + h) / 2;
          if (stk[mid].first < v[i]) {
            h = mid;
          } else if (stk[mid].first > v[i]) {
            l = mid + 1;
          } else {
            l = mid + 1;
          }
        }
        if (stk[l].first < v[i]) {
          index = l;
        } else {
          index = h;
        }
        ans[i] = stk[index].second - i - 1;
      }
    }
  }
  for (i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}
