#include <bits/stdc++.h>
using namespace std;
int n;
int s[100005], tot;
int data[100005];
int ans[100005];
int main() {
  scanf("%d", &n);
  memset(s, 0, sizeof(s));
  tot = 0;
  for (int i = 1; i <= n; i++) scanf("%d", &data[i]);
  data[0] = 1e9;
  for (int i = n; i >= 1; i--) {
    int u = s[tot];
    if (data[i] <= data[u]) {
      ans[i] = -1;
      s[++tot] = i;
      continue;
    }
    int l = 0, r = tot;
    int mid;
    while (l < r) {
      mid = (l + r + 1) / 2;
      if (data[s[mid]] >= data[i])
        l = mid;
      else
        r = mid - 1;
    }
    ans[i] = s[l + 1] - i - 1;
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
}
