#include <bits/stdc++.h>
using namespace std;
const int maxn = 100200;
pair<int, int> qu[maxn], temp;
int main() {
  int n;
  int arr[maxn], ans[maxn];
  scanf("%d", &n);
  for (int i = n; i >= 1; i--) scanf("%d", &arr[i]);
  int h = 1;
  int t = 0;
  temp = make_pair(1, arr[1]);
  ans[1] = -1;
  qu[++t] = temp;
  for (int i = 2; i <= n; i++) {
    temp = make_pair(i, arr[i]);
    if (qu[t].second >= arr[i]) {
      ans[i] = -1;
      qu[++t] = temp;
    } else {
      int l = h, r = t;
      while (l <= r) {
        int mid = (l + r) >> 1;
        if (qu[mid].second < arr[i])
          r = mid - 1;
        else
          l = mid + 1;
      }
      ans[i] = i - qu[l].first - 1;
    }
  }
  for (int i = n; i >= 1; i--) printf("%d ", ans[i]);
  return 0;
}
