#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  cin >> n;
  pair<int, int> p[n];
  int arr[n + 5], vis[100005] = {};
  for (int i = 0; i < n; i++)
    cin >> arr[i], p[i].first = arr[i], p[i].second = i;
  sort(p, p + (n));
  vis[p[0].second] = -1;
  int maxx = p[0].second;
  for (int i = 1; i < n; i++) {
    int diff = (maxx - p[i].second) - 1;
    if (diff >= 0)
      vis[p[i].second] = diff;
    else
      vis[p[i].second] = -1;
    maxx = max(maxx, p[i].second);
  }
  for (int i = 0; i < n; i++) cout << vis[i] << " ";
  return 0;
}
