#include <bits/stdc++.h>
using namespace std;
struct node {
  int i;
  int num;
  bool operator<(node b) const {
    if (num == b.num)
      return i > b.i;
    else
      return num < b.num;
  }
};
priority_queue<node> Q, T;
int N;
int num[120010];
int aa[120010];
bool used[120010];
void solve() {
  memset(aa, -1, sizeof(aa));
  memset(used, 0, sizeof(used));
  int kk = N;
  long long p = 9999999998888888LL, q;
  for (int i = kk; i >= 1; i--) {
    if (num[i] < p) {
      used[i] = 1;
      aa[i] = -1;
      int ggg = 1111;
      int tt = 22;
      p = num[i], q = i;
      while (!Q.empty()) {
        int gg = 22222;
        node w = Q.top();
        if (used[w.i]) {
          Q.pop();
          continue;
        }
        if (w.num <= p) break;
        aa[w.i] = q - w.i - 1;
        int pp = 23232;
        Q.pop();
      }
    } else
      used[i] = 1;
  }
}
node w;
int main() {
  cin >> N;
  while (!Q.empty()) Q.pop();
  while (!T.empty()) T.pop();
  for (int i = 1; i <= N; i++) {
    cin >> num[i];
    w.i = i, w.num = num[i];
    Q.push(w);
  }
  solve();
  for (int i = 1; i <= N; i++) cout << aa[i] << " ";
  cout << endl;
  return 0;
}
