#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 * 100 + 100;
pair<int, int> p[MAXN];
int out[MAXN];
int n;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
    p[i].second = i;
  }
  sort(p, p + n);
  int maj = 0;
  for (int i = 0; i < n; i++) {
    int x = p[i].second;
    if (maj <= x) {
      out[x] = -1;
      maj = x;
    } else {
      out[x] = maj - x - 1;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << out[i] << ' ';
  }
  cout << endl;
  return 0;
}
