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