#include <bits/stdc++.h>
using namespace std;
int a[100000], b[100000];
int ans[100000];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  ans[n - 1] = -1;
  b[n - 1] = -1;
  for (int i = n - 2; i >= 0; i--) {
    int next = b[i + 1];
    int pos = -1;
    while (next != -1 && a[next] < a[i]) {
      pos = next;
      next = b[next];
    }
    if (pos == -1) {
      if (a[i] > a[i + 1])
        ans[i] = 0;
      else
        ans[i] = -1;
    } else {
      if (a[i] > a[pos])
        ans[i] = pos - i - 1;
      else
        ans[i] = -1;
    }
    if (b[i + 1] == -1 || a[b[i + 1]] > a[i + 1])
      b[i] = i + 1;
    else
      b[i] = b[i + 1];
  }
  for (int i = 0; i < n; i++) cout << ans[i] << ' ';
  return 0;
}
