#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long A[n];
  long long B[n];
  for (long long i = 0; i < n; i++) {
    cin >> A[i];
  }
  B[n - 1] = A[n - 1];
  for (long long i = n - 2; i >= 0; i--) {
    B[i] = min(A[i], B[i + 1]);
  }
  for (long long i = 0; i < n; i++) {
    long long index = lower_bound(B + i, B + n, A[i]) - B;
    index--;
    if (index <= i) {
      cout << -1 << " ";
    } else {
      cout << index - i - 1 << " ";
    }
  }
  return 0;
}
