#include <bits/stdc++.h>
const int MOD = int(1e9) + 7;
const int N = 1100;
const int MAXN = int(1e6) + int(1e5);
const int iinf = int(1e9) + int(1e5);
const long long linf = (long long)(1e18) + (long long)(1e17);
const double eps = -1e19;
using namespace std;
int n, a[MAXN], t[MAXN];
void build(int v, int tl, int tr) {
  if (tl == tr) {
    t[v] = a[tl];
    return;
  }
  int tm = (tl + tr) / 2;
  build(2 * v, tl, tm);
  build(2 * v + 1, tm + 1, tr);
  t[v] = min(t[2 * v], t[2 * v + 1]);
}
int get(int v, int l, int r, int tl, int tr, int val) {
  if (tl > tr) return -1;
  if (l == r) return l;
  int tm = (l + r) / 2;
  if (t[2 * v + 1] < val)
    return get(2 * v + 1, tm + 1, r, max(tm + 1, tl), tr, val);
  if (t[2 * v] < val) return get(2 * v, l, tm, tl, min(tm, tr), val);
  return -1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  build(1, 1, n);
  for (int i = 1; i <= n; ++i) {
    int ans = get(1, 1, n, i, n, a[i]);
    if (ans != -1)
      cout << ans - i - 1;
    else
      cout << ans;
    cout << ' ';
  }
}
