#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
using namespace std;
const int MAXN = 100001;
int sparse[MAXN][20];
int logn[MAXN];
int A[MAXN];
int getMAX(int l, int r) {
  return min(sparse[l][logn[r - l + 1]],
             sparse[r - (1 << logn[r - l + 1]) + 1][logn[r - l + 1]]);
}
int main() {
  int st = 0;
  int str = 2;
  logn[0] = logn[1] = 0;
  for (int i = 2; i < MAXN; i++)
    if (i == str)
      logn[i] = ++st, str <<= 1;
    else
      logn[i] = st;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> A[i];
  for (int i = 0; i < n; i++) sparse[i][0] = A[i];
  for (int j = 1; j <= logn[n]; j++) {
    for (int i = 0; i + (1 << j) <= n; i++)
      sparse[i][j] = min(sparse[i][j - 1], sparse[i + (1 << (j - 1))][j - 1]);
  }
  for (int i = 0; i < n; i++) {
    int l = i + 1, r = n - 1;
    if (l > r) {
      cout << -1 << " ";
      continue;
    }
    if (getMAX(i + 1, n - 1) >= A[i]) {
      cout << -1 << " ";
      continue;
    }
    while (r > l + 1) {
      int m = (l + r) / 2;
      if (getMAX(m, n - 1) >= A[i])
        r = m;
      else
        l = m;
    }
    if (A[i] > A[r])
      cout << r - i - 1 << " ";
    else
      cout << r - i - 2 << " ";
  }
}
