#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
int a[100001], ans[100001], siz = 0;
pair<int, int> v[100001];
int main() {
  int n, num = 1000000001;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  reverse(a, a + n);
  ans[0] = -1, siz = 1, v[0] = {a[0], 0};
  for (int i = 1; i < n; i++) {
    if (a[i] < v[siz - 1].first) {
      v[siz] = {a[i], i};
      siz++;
      ans[i] = -1;
    } else {
      int l = 0, r = siz - 1, mid;
      a[i]--;
      while ((r - l) > 1) {
        mid = (l + r) / 2;
        if (v[mid].first < a[i])
          r = mid;
        else
          l = mid;
      }
      if (v[l].first <= a[i])
        ans[i] = i - v[l].second - 1;
      else if (v[r].first <= a[i])
        ans[i] = i - v[r].second - 1;
      else
        ans[i] = -1;
    }
  }
  for (int i = n - 1; i > -1; i--) cout << ans[i] << " ";
  return 0;
}
