#include <bits/stdc++.h>
using namespace std;
pair<long long int, int> p[1000000];
long long a[1000000];
int main() {
  int n;
  while (cin >> n) {
    fill(a, a + n, 0);
    for (int u = 0; u < n; u++) {
      cin >> a[u];
      p[u].first = a[u];
      p[u].second = u;
    }
    sort(p, p + n);
    long long max = p[0].second;
    for (int y = 0; y < n; y++) {
      if (p[y].second > max) {
        max = p[y].second;
        a[p[y].second] = -1;
      } else
        a[p[y].second] = max - p[y].second - 1;
    }
    for (int t = 0; t < n; t++) cout << a[t] << "  ";
  }
  return 0;
}
