#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, int> x, pair<int, int> y) {
  if (x.first != y.first) {
    return x.first < y.first;
  }
  return x.second < y.first;
}
int main() {
  int n;
  cin >> n;
  vector<pair<int, int>> v(n);
  int ans[n + 1];
  for (int i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = i + 1;
  }
  sort(v.begin(), v.end());
  int ind = v[0].second;
  ans[ind] = -1;
  for (int i = 1; i < n; i++) {
    if (ind < v[i].second) {
      ans[v[i].second] = -1;
    } else
      ans[v[i].second] = ind;
    ind = max(ind, v[i].second);
  }
  for (int i = 1; i <= n; i++) {
    if (ans[i] != -1) ans[i] = (ans[i] - i - 1);
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
