#include <bits/stdc++.h>
using namespace std;
map<signed long long int, int> ass;
int occ[100000 + 5], tree[100000];
signed long long int a[100000 + 5], b[100000 + 5];
int read(int idx) {
  int sum = 0;
  while (idx > 0) {
    sum = max(tree[idx], sum);
    idx -= (idx & -idx);
  }
  return sum;
}
void update(int idx, int val) {
  while (idx <= 100000) {
    tree[idx] = max(val, tree[idx]);
    idx += (idx & -idx);
  }
}
vector<int> ans;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(b + 1, b + n + 1);
  int t = 0;
  for (int i = 1; i <= n; ++i) {
    if (b[i] != b[i - 1]) t++;
    ass[b[i]] = t;
  }
  for (int i = 1; i <= n; ++i) a[i] = ass[a[i]];
  update(a[n], n);
  ans.push_back(-1);
  for (int i = n - 1; i >= 1; i--) {
    int at = read(a[i] - 1);
    if (at == 0)
      ans.push_back(-1);
    else
      ans.push_back(at - i - 1);
    if (occ[a[i]] == 0) {
      occ[a[i]] = 1;
      update(a[i], i);
    }
  }
  for (int i = n; i >= 1; i--) cout << ans[i - 1] << ' ';
}
