#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5;
struct Node {
  int age;
  int pos;
  bool operator<(const Node &x) const {
    if (age == x.age) return pos < x.pos;
    return age < x.age;
  }
};
Node a[maxn];
int ans[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i].age);
    a[i].pos = i;
  }
  sort(a, a + n);
  int maxpos = a[0].pos;
  ans[a[0].pos] = -1;
  for (int i = 1; i < n; ++i) {
    if (a[i].pos < maxpos) {
      ans[a[i].pos] = maxpos - a[i].pos - 1;
    } else {
      maxpos = a[i].pos;
      ans[a[i].pos] = -1;
    }
  }
  for (int i = 0; i < n; ++i) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
