#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int num[N];
int ans[N];
int main() {
  int n;
  scanf("%d", &n);
  vector<int> dq;
  vector<int> pos;
  dq.clear();
  pos.clear();
  for (int i = 0; i < n; i++) scanf("%d", &num[i]);
  for (int i = n - 1; i >= 0; i--) {
    if (dq.size() == 0 || dq.back() >= num[i]) {
      dq.push_back(num[i]);
      pos.push_back(i);
      ans[i] = -1;
    } else {
      int j = lower_bound(dq.rbegin(), dq.rend(), num[i]) - dq.rbegin();
      j = (int)dq.size() - j;
      ans[i] = pos[j] - i - 1;
    }
  }
  for (int i = 0; i <= n - 2; i++) printf("%d ", ans[i]);
  printf("%d\n", ans[n - 1]);
  return 0;
}
