#include <bits/stdc++.h>
using namespace std;
long long int m, n, c, d, j, k, l, r, x, t, y, u, z, i, e, f, g, h;
int main() {
  cin >> n;
  long long int a[n + 1], b[n + 1];
  for (i = 0; i < n; i++) cin >> a[i];
  b[n - 1] = a[n - 1];
  for (i = n - 2; i >= 0; i--) {
    b[i] = min(b[i + 1], a[i]);
  }
  for (i = 0; i < n; i++) {
    x = lower_bound(b + i, n + b, a[i]) - b;
    if (x - i - 2 < 0)
      cout << -1 << " ";
    else
      cout << x - i - 2 << " ";
  }
}
