#include <bits/stdc++.h>
using namespace std;
struct rec {
  int v;
  int now;
};
int cmp(rec x, rec y) {
  if (x.v == y.v) return x.now > y.now;
  return x.v < y.v;
}
rec a[100005];
int b[100005];
int c[100005];
map<int, int> mp;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> c[i];
    a[i].v = c[i];
    a[i].now = i;
  }
  sort(a + 1, a + n + 1, cmp);
  int p = a[1].v;
  int k = 0;
  b[++k] = a[1].now;
  mp[a[1].v] = k;
  for (int i = 1; i <= n; i++) {
    if (p == a[i].v) continue;
    p = a[i].v;
    b[++k] = max(b[k - 1], a[i].now);
    mp[a[i].v] = k;
  }
  for (int i = 1; i <= n; i++) {
    if (b[mp[c[i]] - 1] < i)
      cout << -1 << " ";
    else
      cout << b[mp[c[i]] - 1] - i - 1 << " ";
  }
  cout << endl;
  return 0;
}
