#include <bits/stdc++.h>
using namespace std;
int n;
pair<int, int> ar[100005];
int bit[100005], ans[100005];
void apdet(const int &x, const int &v) {
  for (int k = x; k <= n; k += k & -k) bit[k] = max(bit[k], v);
}
int kueri(const int &x) {
  int ret = 0;
  for (int k = x; k; k -= k & -k) ret = max(ret, bit[k]);
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = (int)1; i <= (int)n; ++i) {
    scanf("%d", &ar[i].first);
    ar[i].second = i;
  }
  sort(ar + 1, ar + n + 1);
  int t = 1;
  for (int i = (int)1; i <= (int)n; ++i) {
    if (i == 1 || ar[i].first != ar[i - 1].first)
      ar[i].first = ++t;
    else
      ar[i].first = t;
  }
  for (int i = (int)1; i <= (int)n; ++i) {
    int x = ar[i].second;
    int rights = kueri(ar[i].first - 1);
    apdet(ar[i].first, x);
    if (rights == 0 || rights < x)
      ans[x] = -1;
    else
      ans[x] = rights - x - 1;
  }
  for (int i = (int)1; i <= (int)n; ++i)
    printf("%d%c", ans[i], (i < n) ? ' ' : '\n');
  return 0;
}
