#include <bits/stdc++.h>
int ex[] = {1, -1, 0, 0};
int wye[] = {0, 0, 1, -1};
using namespace std;
pair<int, int> pr[100005];
int an[100005], n, a, b, c, d;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &pr[i].first);
    pr[i].second = i;
  }
  sort(pr + 1, pr + n + 1);
  for (int i = 1; i <= n; i++) {
    if (pr[i].first > a && pr[i].second > b) {
      an[pr[i].second] = -1;
      c = a;
      d = b;
      a = pr[i].first;
      b = pr[i].second;
    } else if (pr[i].first > a && pr[i].second < b) {
      an[pr[i].second] = b - pr[i].second - 1;
    } else if (pr[i].first == a && c && pr[i].second < d) {
      an[pr[i].second] = d - pr[i].second - 1;
    } else if (pr[i].first == a) {
      an[pr[i].second] = -1;
    }
    if (pr[i].first == a && pr[i].second > b) {
      b = pr[i].second;
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", an[i]);
  return 0;
}
