#include <bits/stdc++.h>
using namespace std;
int temp[100500], ans[100500], n;
pair<int, int> a[100500];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a, a + n);
  temp[0] = 0;
  ans[a[0].second] = -1;
  for (int i = 1; i < n; i++) {
    temp[i] = (a[i].second > a[temp[i - 1]].second) ? i : temp[i - 1];
    ans[a[i].second] = a[temp[i]].second - a[i].second - 1;
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
