#include <bits/stdc++.h>
using namespace std;
int arr[100100];
pair<int, int> seq[100100];
int ans[100100];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  int idx = n;
  seq[idx] = make_pair(arr[idx], idx);
  ans[idx] = -1;
  for (int i = n - 1; i >= 1; i--) {
    int cur = arr[i];
    if (cur <= seq[idx].first) {
      ans[i] = -1;
      if (cur != seq[idx].first) seq[--idx] = make_pair(cur, i);
      continue;
    }
    int ub = lower_bound(seq + idx + 1, seq + n + 1, make_pair(cur, i)) - seq;
    ub--;
    ans[i] = seq[ub].second - i - 1;
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}
