#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first < b.first)
    return 1;
  else
    return 0;
}
int main() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<pair<long long, long long> > cur;
  for (long long j = n - 1; j >= 0; j--) {
    if (j == n - 1)
      cur.push_back(make_pair(a[j], j));
    else {
      long long e = cur.size() - 1;
      if (a[j] < cur[e].first) {
        cur.push_back(make_pair(a[j], j));
      }
    }
  }
  sort(cur.begin(), cur.end(), cmp);
  for (long long i = 0; i < n; i++) {
    vector<pair<long long, long long> >::iterator k =
        lower_bound(cur.begin(), cur.end(), make_pair(a[i], 0), cmp);
    if (k == cur.begin()) {
      cout << -1 << " ";
      continue;
    }
    k--;
    if (k->second > i)
      cout << (k->second) - i - 1 << " ";
    else
      cout << -1 << " ";
  }
  return 0;
}
