#include <bits/stdc++.h>
using namespace std;
signed long long int i, j, n, p = 0, c = 1, sum = 0, k, ct, d, sum1 = 0, q, t;
map<signed long long int, signed long long int> m, m1;
const int maxn = 1e3 + 100, inf = 1e9 + 100;
vector<pair<signed long long int, signed long long int> > v1, v2;
vector<signed long long int> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  signed long long int a[n], b[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
    m[i] = -1;
    m1[a[i]] = -1;
  }
  sort(b, b + n);
  q = n;
  for (i = n - 1; i >= 0; i--) {
    p = upper_bound(b, b + n, a[i]) - b;
    if (m[p] == -1 && p < q) {
      m[p] = n - 1 - i;
      if (p < q) q = p;
    }
  }
  p = -1;
  for (i = 1; i < n; i++) {
    if (m[i - 1] != -1 && m[i] == -1) {
      m[i] = m[i - 1];
      m1[b[i]] = m[i - 1];
    } else if (m[i - 1] == -1 && m[i] > -1) {
      m[i] = m[i];
      m1[b[i]] = m[i];
    } else if (m[i - 1] != -1 && m[i] < m[i - 1]) {
      m[i] = m[i];
      m1[b[i]] = m[i];
    }
  }
  for (i = 0; i < n; i++) {
    if (n - 1 - i > m1[a[i]] && m1[a[i]] != -1)
      cout << n - 2 - i - m1[a[i]] << " ";
    else
      cout << "-1"
           << " ";
  }
}
