#include <bits/stdc++.h>
using namespace std;
int n[2000000][26];
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long> w(n);
  vector<pair<long long, long long> > v;
  vector<long long> o;
  for (int i = 0; i < n; i++) {
    cin >> w[i];
  }
  for (int i = n - 1; i >= 0; i--) {
    bool p = 0;
    auto j = lower_bound(v.begin(), v.end(), make_pair(w[i], 0),
                         greater<pair<long long, long long> >());
    if (j != v.end()) {
      o.push_back(j->second - i - 1);
      p = 1;
    } else {
      o.push_back(-1);
      v.push_back(make_pair(w[i], i));
    }
  }
  reverse(o.begin(), o.end());
  for (auto a : o) {
    cout << a << " ";
  }
  cout << endl;
  return 0;
}
