#include <bits/stdc++.h>
using namespace std;
int arr[100009];
int arr1[100009];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  arr1[n - 1] = arr[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    arr1[i] = min(arr[i], arr1[i + 1]);
  }
  for (int i = 0; i < n; i++) {
    int ans = lower_bound(arr1 + i + 1, arr1 + n, arr[i]) - (arr1 + i + 2);
    cout << ans << " ";
  }
  return 0;
}
