#include <bits/stdc++.h>
using namespace std;
const int maxN = 102400;
struct QQ {
  int age;
  int idx;
};
bool cmp(const QQ& a, const QQ& b) { return a.age < b.age; }
QQ que[maxN];
int ages[maxN], in[maxN], dp[maxN][20];
inline int MAX(int a, int b) { return a > b ? a : b; }
void process(int ni) {
  for (int i = 0; i < ni; i++) dp[i][0] = i;
  for (int j = 1; (1 << j) < ni; j++)
    for (int i = 0; i + (1 << j) - 1 < ni; i++)
      if (que[dp[i][j - 1]].idx > que[dp[i + (1 << (j - 1))][j - 1]].idx)
        dp[i][j] = dp[i][j - 1];
      else
        dp[i][j] = dp[i + (1 << (j - 1))][j - 1];
}
int RMQ(int l, int r) {
  int k = (int)(log((double)r - l + 1) / log((double)2));
  return MAX(que[dp[l][k]].idx, que[dp[r - (1 << k) + 1][k]].idx);
}
int main() {
  int nq;
  cin >> nq;
  for (int i = 0; i < nq; i++) {
    cin >> in[i];
    que[i].age = in[i];
    que[i].idx = i;
  }
  sort(que, que + nq, cmp);
  for (int i = 0; i < nq; i++) {
    ages[i] = que[i].age;
  }
  process(nq);
  for (int i = 0; i < nq; i++) {
    int idx = lower_bound(ages, ages + nq, in[i]) - ages;
    int ll = 0;
    int rr = idx - 1;
    if (rr == -1)
      cout << -1;
    else {
      int res = RMQ(ll, rr);
      if (res <= i)
        cout << -1;
      else
        cout << res - i - 1;
    }
    if (i != nq - 1)
      cout << " ";
    else
      cout << endl;
  }
  return 0;
}
