#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAXN = 1.01e5;
int ar[MAXN];
int res[MAXN];
struct Tree {
  using T = int;
  T ID = 1e9;
  T f(T a, T b) { return min(a, b); }
  vector<T> tree;
  int n;
  Tree() {}
  Tree(int _n) : n(_n) {
    int m = 1;
    while (m < n) m *= 2;
    tree.resize(2 * m, ID);
  }
  void update(int i, T val) { upd(1, 0, n - 1, i, val); }
  void upd(int x, int l, int r, int ind, T val) {
    if (ind > r || ind < l || r < l) return;
    if (l == r) {
      tree[x] = min(val, tree[x]);
      return;
    }
    upd(x + x, l, (l + r) / 2, ind, val);
    upd(x + x + 1, (l + r) / 2 + 1, r, ind, val);
    tree[x] = f(tree[x + x], tree[x + x + 1]);
  }
  T query(int l, int r) { return qry(1, 0, n - 1, l, r); }
  T qry(int x, int l, int r, int ql, int qr) {
    if (qr < l || ql > r || r < l) return ID;
    if (ql <= l && qr >= r) return tree[x];
    return f(qry(x + x, l, (l + r) / 2, ql, qr),
             qry(x + x + 1, (l + r) / 2 + 1, r, ql, qr));
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    cin >> ar[i];
    mp[ar[i]];
  }
  int cnt = 0;
  for (auto &x : mp) x.second = cnt++;
  for (int i = 0; i < n; ++i) ar[i] = mp[ar[i]];
  reverse(ar, ar + n);
  Tree T(n);
  for (int i = 0; i < n; ++i) {
    int x = T.query(0, ar[i] - 1);
    if (x == T.ID) {
      res[i] = -1;
    } else {
      res[i] = i - x - 1;
    }
    T.update(ar[i], i);
  }
  for (int i = n - 1; i >= 0; --i) {
    cout << res[i] << ' ';
  }
  cout << '\n';
  return 0;
}
