#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long arr[n], min[n];
  for (long long i = 0; i <= n - 1; i++) {
    cin >> arr[i];
    min[i] = arr[i];
  }
  int mini = min[n - 1];
  for (long long i = n - 1; i >= 0; i--) {
    if (min[i] < mini) mini = min[i];
    min[i] = mini;
  }
  for (long long i = 0; i <= n - 1; i++) {
    long long pos = upper_bound(min, min + n, arr[i] - 1) - min - 1;
    cout << ((pos - i - 1) >= 0 ? (pos - i - 1) : -1) << " ";
  }
  return 0;
}
