#include <bits/stdc++.h>
using namespace std;
int seq[100100];
pair<int, int> ord[100100];
map<int, int> dir;
int n;
bool ordena(pair<int, int> a, pair<int, int> b) { return a.first > b.first; }
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> seq[i];
    ord[i].first = seq[i];
    ord[i].second = i;
  }
  sort(ord + 1, ord + 1 + n, ordena);
  int maid = 0;
  for (int i = n; i >= 0; i--) {
    if (ord[i].first != ord[i + 1].first) {
      dir[ord[i].first] = maid;
    }
    maid = max(maid, ord[i].second);
  }
  for (int i = 1; i <= n; i++) {
    maid = dir[seq[i]];
    if (maid > i) {
      cout << maid - i - 1 << " ";
    } else {
      cout << -1 << " ";
    }
  }
  cout << endl;
}
