#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
int a[MAXN];
int MIN[MAXN << 3];
void PushUPmin(int rt) { MIN[rt] = min(MIN[rt << 1], MIN[rt << 1 | 1]); }
void buildmin(int l, int r, int rt) {
  if (l == r) {
    MIN[rt] = a[l];
    return;
  }
  int m = (l + r) >> 1;
  buildmin(l, m, rt << 1);
  buildmin(m + 1, r, rt << 1 | 1);
  PushUPmin(rt);
}
int querymin(int L, int R, int l, int r, int rt) {
  if (L <= l && r <= R) {
    return MIN[rt];
  }
  int m = (l + r) >> 1;
  int ret = 999999999;
  if (L <= m) ret = min(ret, querymin(L, R, l, m, rt << 1));
  if (R > m) ret = min(ret, querymin(L, R, m + 1, r, rt << 1 | 1));
  return ret;
}
int main() {
  int m, n, i, j, k;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  buildmin(1, n, 1);
  for (i = 1; i <= n; i++) {
    int l = 0, r = n, o = 50, ans = -1, mid;
    while (o--) {
      mid = (l + r) >> 1;
      if (l > r || r < 0) break;
      if (n - mid > i && querymin(n - mid, n, 1, n, 1) >= a[i]) {
        l = mid + 1;
      } else {
        r = mid - 1;
        ans = max(ans, n - mid);
      }
    }
    if (ans == i || i == n)
      ans = -1;
    else
      ans -= (i + 1);
    printf("%d ", ans);
  }
  cout << endl;
}
