#include <bits/stdc++.h>
using namespace std;
void run_case() {
  long long n;
  cin >> n;
  vector<long long> a(n, 0);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long mini[n];
  mini[n - 1] = a[n - 1];
  for (long long i = n - 2; i >= 0; i--) {
    mini[i] = min(mini[i + 1], a[i]);
  }
  for (long long i = 0; i < n; i++) {
    long long idx = lower_bound(mini + i + 1, mini + n, a[i]) - mini;
    cout << idx - i - 2 << " ";
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(20);
  long long tests = 1;
  for (long long tt = 1; tt <= tests; tt++) {
    run_case();
  }
  return 0;
}
