#include <bits/stdc++.h>
using namespace std;
string world[8] = {"U", "D", "R", "L", "UL", "UR", "DR", "DL"};
const int rx[8] = {-1, 1, 0, 0, -1, -1, 1, 1};
const int ry[8] = {0, 0, 1, -1, -1, 1, 1, -1};
struct maxtree {
  vector<int> t;
  int n;
  maxtree(int x) {
    n = x;
    t.resize(n << 1, int(1e9));
  }
  void modify(int p, int val) {
    p += n;
    if (t[p] < val) return;
    for (t[p] = val; p > 1; p >>= 1) t[p >> 1] = min(t[p], t[p ^ 1]);
  }
  int query(int l, int r) {
    int ans = int(1e9);
    for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
      if (l & 1) ans = min(ans, t[l++]);
      if (r & 1) ans = min(ans, t[--r]);
    }
    return ans;
  }
};
int main() {
  int n;
  cin >> n;
  int a[n];
  map<int, int> zip;
  for (int i = 0; i < n; i++) {
    cin >> a[n - i - 1];
    zip[a[n - i - 1]] = 1;
  }
  int number = 0;
  for (auto it = zip.begin(); it != zip.end(); it++) {
    (*it).second = number;
    number++;
  }
  int ans[n];
  maxtree T = maxtree(n + 1);
  for (int i = 0; i < n; i++) {
    ans[i] = -1;
    a[i] = zip[a[i]];
    int cur = T.query(0, a[i]);
    if (cur < int(1e9)) {
      ans[i] = i - cur - 1;
    }
    T.modify(a[i], i);
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[n - i - 1]);
  }
  return 0;
}
