#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  std::vector<int> a(n), mn(n);
  for (int i = 0; i < n; ++i) {
    std::cin >> a[i];
  }
  mn[n - 1] = a[n - 1];
  for (int i = n - 2; i >= 0; --i) {
    mn[i] = std::min(mn[i + 1], a[i]);
  }
  for (int i = 0; i < n; ++i) {
    int left = i, right = n - 1;
    while (right > left) {
      int mid = (left + right + 1) >> 1;
      if (mn[mid] < a[i]) {
        left = mid;
      } else {
        right = mid - 1;
      }
    }
    std::cout << left - i - 1 << ' ';
  }
  return 0;
}
