#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1e5 + 7;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  long long n, inp[MAX];
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> inp[i];
  long long curmin = 1e18, mins[MAX];
  for (long long i = n - 1; i >= 0; i--)
    curmin = min(curmin, inp[i]), mins[i] = curmin;
  for (long long i = 0; i < n; i++) {
    long long lo = i + 1, hi = n - 1, mid;
    while (lo <= hi) {
      mid = (lo + hi) >> 1;
      if (mins[mid] < inp[i])
        lo = mid + 1;
      else
        hi = mid - 1;
    }
    cout << (lo - 1) - i - 1;
    (i == n - 1) ? cout << '\n' : cout << ' ';
  }
  return 0;
}
