#include <bits/stdc++.h>
using namespace std;
using namespace std;
int n, d, m, sum, mn = 0, k, b, mx = -INT_MAX;
string s;
vector<pair<int, int> > v;
int arr[1000001], a[1000001];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]), v.push_back({a[i], i});
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) {
    if (v[i].second > mx)
      mx = v[i].second, arr[v[i].second] = -1;
    else
      arr[v[i].second] = mx - v[i].second - 1;
  }
  for (int i = 0; i < n; i++) cout << arr[i] << ' ';
}
