#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > a(n);
  for (int i = 0; i < n; ++i) {
    int v;
    cin >> v;
    a[i] = make_pair(v, i);
  }
  sort(a.begin(), a.end());
  vector<int> res(n);
  int pos = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i].second > pos) pos = a[i].second;
    res[a[i].second] = pos - a[i].second - 1;
  }
  for (int i = 0; i < n; ++i) cout << res[i] << " ";
  return 0;
}
