#include <bits/stdc++.h>
using namespace std;
int v[100010];
int r[100010];
pair<int, int> vp[100010];
int p, n;
int pos, val, res;
int bitsize;
int bit[100010];
int read(int idx) {
  int sum = 0;
  while (idx > 0) {
    sum = max(sum, bit[idx]);
    idx -= (idx & -idx);
  }
  return sum;
}
void update(int idx, int val) {
  while (idx <= bitsize) {
    bit[idx] = max(bit[idx], val);
    idx += (idx & -idx);
  }
}
int main() {
  scanf("%d", &n);
  p = 0;
  bitsize = n + 1;
  memset(bit, 0, (n + 2) * sizeof(int));
  for (int i = 0; i < n; i++) {
    scanf("%d", v + i);
    vp[p++] = pair<int, int>(v[i], i);
  }
  sort(vp, vp + p);
  for (int i = 0; i < n; i++) {
    update(i + 1, vp[i].second);
  }
  for (int i = 0; i < n; i++) {
    val = vp[i].first;
    pos = vp[i].second;
    res = read(i + 1);
    if (res == pos)
      r[pos] = -1;
    else
      r[pos] = res - pos - 1;
  }
  for (int i = 0; i < n; i++) printf("%d ", r[i]);
  printf("\n");
  return 0;
}
