#include <bits/stdc++.h>
using namespace std;
const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const long long int Inf = 1LL << 62;
pair<int, int> ar[Max];
int n;
int br[Max];
int BIT[Max];
int ans[Max];
void update(int idx, int val) {
  while (idx <= n) {
    BIT[idx] = max(BIT[idx], val);
    idx += idx & -idx;
  }
}
int query(int idx) {
  int ret = 0;
  while (idx > 0) {
    ret = max(ret, BIT[idx]);
    idx -= idx & -idx;
  }
  return ret;
}
int query(int l, int r) { return query(r) - query(l - 1); }
void Compress() {
  sort(ar + 1, ar + n + 1);
  for (int i = 1; i <= n; i++) {
    br[ar[i].second] =
        br[ar[i - 1].second] + (ar[i].second != ar[i - 1].second);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> ar[i].first;
    ar[i].second = i;
  }
  Compress();
  for (int i = n; i >= 1; i--) {
    int res = query(1, br[i] - 1);
    if (!res) {
      ans[i] = -1;
    } else {
      ans[i] = res - i - 1;
    }
    update(br[i], i);
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
