#include <bits/stdc++.h>
using namespace std;
int v[100005], m[100005], ans[100005];
int main() {
  int N, i, j, l, r, mid;
  cin >> N;
  for (i = 1; i <= N; ++i) cin >> v[i];
  m[N] = v[N];
  for (i = N - 1; i > 0; --i) m[i] = min(v[i], m[i + 1]);
  ans[N] = -1;
  for (i = N - 1; i > 0; --i) {
    l = i + 1;
    r = N;
    while (r - l > 1) {
      mid = (l + r) / 2;
      if (m[mid] >= v[i])
        r = mid;
      else
        l = mid;
    }
    if (v[r] < v[i])
      ans[i] = r - i - 1;
    else if (v[l] < v[i])
      ans[i] = l - i - 1;
    else
      ans[i] = -1;
  }
  for (i = 1; i <= N; ++i) cout << ans[i] << ' ';
  cout << '\n';
  return 0;
}
