#include <bits/stdc++.h>
using namespace std;
int a[100000];
int m[100001];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  m[n] = 1e9 + 1;
  for (int i = n - 1; i >= 0; i--) {
    m[i] = min(m[i + 1], a[i]);
  }
  for (int i = 0; i < n; i++) {
    cout << (lower_bound(m + i + 1, m + n, a[i]) - m - i - 2) << "\n";
  }
  return 0;
}
