#include <bits/stdc++.h>
using namespace std;
vector<int> a;
vector<int> mins;
int bp(int i, int n) {
  int l, r, c = n - 1;
  l = i + 1;
  r = n - 1;
  while (r > l) {
    c = (r + l) / 2;
    if (mins[c] < a[i])
      l = c + 1;
    else
      r = c - 1;
  }
  if (a[i] > mins[c])
    return c - i - 1;
  else
    return -1;
}
int main() {
  int n, i = 0, tmp;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> tmp;
    a.push_back(tmp);
  }
  mins.resize(n);
  mins[n - 1] = a[n - 1];
  for (i = n - 2; i >= 0; i--) {
    mins[i] = min(a[i], mins[i + 1]);
  }
  for (i = 0; i < n - 1; i++) {
    vector<int>::iterator jaja =
        lower_bound(mins.begin() + i + 1, mins.end(), a[i]) - 1;
    vector<int>::iterator ololo = mins.begin();
    if (*jaja < a[i])
      cout << (jaja - ololo - i - 1) << " ";
    else
      cout << -1 << " ";
  }
  cout << -1 << endl;
  return 0;
}
