#include <bits/stdc++.h>
using namespace std;
int n, arr[100005], BIT[100005];
void update(int idx, int val) {
  while (idx <= n) {
    BIT[idx] = max(BIT[idx], val);
    idx += idx & (-idx);
  }
}
int query(int idx) {
  if (idx == 0) return 0;
  int ans = 0;
  while (idx) {
    ans = max(ans, BIT[idx]);
    idx -= idx & (-idx);
  }
  return ans;
}
map<int, int> compress;
int ans[100005];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    compress[arr[i]];
  }
  int c = 0;
  for (map<int, int>::iterator it = compress.begin(); it != compress.end();
       it++)
    it->second = ++c;
  for (int i = n; i >= 1; i--) {
    arr[i] = compress[arr[i]];
    int pos = query(arr[i] - 1);
    if (pos == 0)
      ans[i] = -1;
    else
      ans[i] = pos - i - 1;
    update(arr[i], i);
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
