#include <bits/stdc++.h>
using namespace std;
pair<int, int> v[1 << 18];
int n, mx, ans[1 << 18];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &v[i].first), v[i].second = i;
  sort(v + 1, v + 1 + n);
  int j = 1;
  while (v[1].first == v[j].first) mx = max(mx, v[j].second), j++;
  for (int i = 1; i < j; i++) ans[v[i].second] = -1;
  for (int i = j; i <= n; i++) {
    int g = 0, j = i;
    while (v[i].first == v[j].first) g = max(g, v[j].second), j++;
    i = j - 1, j--;
    while (v[i].first == v[j].first)
      ans[v[j].second] = max(-1, mx - v[j].second - 1), j--;
    mx = max(mx, g);
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
}
