#include <bits/stdc++.h>
using namespace std;
struct Str {
  bool operator()(const long &lhs, const long &rhs) { return (lhs < rhs); }
};
int main() {
  long n;
  cin >> n;
  vector<long> mass1(n, 0);
  for (long i = 0; i < n; i++) cin >> mass1[i];
  vector<long> minn(n, 0);
  minn[n - 1] = mass1[n - 1];
  for (long i = n - 2; i >= 0; i--) minn[i] = min(minn[i + 1], mass1[i]);
  vector<long>::iterator it;
  Str sq;
  long t;
  for (long i = 0; i < n; i++) {
    it = lower_bound(minn.begin(), minn.end(), mass1[i], sq);
    if (it != minn.begin()) {
      t = (long)((it--) - minn.begin()) - i - 2;
      if (t >= 0)
        cout << t << " ";
      else
        cout << "-1 ";
    } else
      cout << "-1 ";
  }
}
