#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long long INFL = LLONG_MAX;
const long double pi = acos(-1);
int N;
int A[100100];
int mn[100100];
int ans[100100];
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(15);
  cout << fixed;
  cout.tie(0);
  cin >> N;
  for (int(i) = 1, j123 = N; (i) <= j123; (i)++) cin >> A[i];
  ans[N] = -1;
  mn[N] = A[N];
  for (int i = N - 1; i >= 1; i--) {
    if (A[i] > mn[N]) {
      ans[i] = N - i - 1;
      mn[i] = min(mn[i + 1], A[i]);
      continue;
    }
    if (A[i] <= mn[i + 1]) {
      ans[i] = -1;
      mn[i] = min(mn[i + 1], A[i]);
      continue;
    }
    int good = i + 1;
    int bad = N;
    while (good + 1 < bad) {
      int m = (good + bad) / 2;
      if (A[i] > mn[m])
        good = m;
      else
        bad = m;
    }
    ans[i] = good - i - 1;
    mn[i] = min(mn[i + 1], A[i]);
    continue;
  }
  for (int(i) = 1, j123 = N; (i) <= j123; (i)++)
    cout << ans[i] << (i + 1 <= N ? ' ' : '\n');
}
