#include <bits/stdc++.h>
using namespace std;
int tempVal, n, i, farLow, sol[100000];
pair<int, int> val[100000];
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> tempVal;
    val[i] = {tempVal, i};
  }
  sort(val, val + n);
  for (i = 0; i < n; i++) {
    if (val[i].second > farLow) {
      sol[val[i].second] = -1;
      farLow = val[i].second;
    } else {
      sol[val[i].second] = farLow - val[i].second - 1;
    }
  }
  for (i = 0; i < n; i++) {
    cout << sol[i] << ' ';
  }
}
