#include <bits/stdc++.h>
using namespace std;
int n, Array[100005], Suffix_Minimum[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> Array[i];
  }
  Array[n] = 1e9 + 100;
  Suffix_Minimum[n] = 1e9 + 100;
  for (int i = n - 1; i >= 0; i--) {
    Suffix_Minimum[i] = min(Suffix_Minimum[i + 1], Array[i]);
  }
  for (int i = 0; i < n; i++) {
    int lo = i + 1, hi = n - 1;
    int pos = i;
    int furthestMin = Array[i];
    while (hi - lo > 10) {
      int mid = (lo + hi) / 2;
      if (Suffix_Minimum[mid] < Array[i] &&
          Suffix_Minimum[mid + 1] < Array[i]) {
        lo = mid;
      } else
        hi = mid;
    }
    for (int k = hi; k >= lo; k--) {
      if (Suffix_Minimum[k] < Array[i] && Suffix_Minimum[k + 1] >= Array[i]) {
        pos = k;
        break;
      }
    }
    if (pos == i)
      cout << -1 << " ";
    else
      cout << pos - i - 1 << " ";
  }
  return 0;
}
