#include <bits/stdc++.h>
using namespace std;
struct walrus {
  int i, age;
} q[100001];
bool f(walrus a, walrus b) {
  if (a.age != b.age) return a.age < b.age;
  return a.i < b.i;
}
int arr[100001], ans[100001];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    q[i].i = i;
    q[i].age = arr[i];
  }
  sort(q, q + n, f);
  for (int i = n - 1, j = n - 1; i >= 0; i--) {
    while (j >= 0 && arr[i] < q[j].age) {
      ans[q[j].i] = i;
      j--;
    }
    if (j >= 0 && q[j].i == i) {
      ans[i] = i;
      j--;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] - i - 1 << ' ';
  }
  return 0;
}
