#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
pair<int, int> a[100100];
int ans[100100];
int n;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i].first, a[i].second = i;
  sort(a, a + n);
  int d = a[0].second;
  ans[a[0].second] = -1;
  for (int i = 1; i < n; i++) {
    if (d < a[i].second) {
      ans[a[i].second] = -1;
      d = a[i].second;
    } else if (d > a[i].second) {
      ans[a[i].second] = d - a[i].second - 1;
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
