#include <bits/stdc++.h>
using namespace std;
vector<long long> a(100500), dp(100500);
long long n;
int main() {
  cin >> n;
  long long i, j;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  dp[n] = a[n];
  for (i = n - 1; i >= 1; i--) {
    dp[i] = min(dp[i + 1], a[i]);
  }
  for (i = 1; i < n - 1; i++) {
    long long cur = a[i];
    if (cur <= dp[i + 1])
      cout << -1;
    else if (cur > dp[n])
      cout << n - i - 1;
    else {
      long long pravo = n, levo = i + 1;
      while (pravo - levo > 1) {
        long long mid = (levo + pravo) / 2;
        if (cur > dp[mid])
          levo = mid;
        else
          pravo = mid;
      }
      cout << levo - i - 1;
    }
    cout << " ";
  }
  if (a[n - 1] > a[n])
    cout << 0;
  else
    cout << -1;
  cout << " ";
  cout << -1;
  return 0;
}
