#include <bits/stdc++.h>
using namespace std;
int a[110000];
vector<int> aa;
map<int, int> mp;
int d[140000];
int lowbit(int x) { return (x & (x - 1)) ^ x; }
void add(int x, int y) {
  int i;
  for (i = x; i <= (1 << 17); i += lowbit(i))
    if (y < d[i]) d[i] = y;
}
int get(int x) {
  int i, ans;
  ans = 2000000000;
  for (i = x; i > 0; i -= lowbit(i))
    if (d[i] < ans) ans = d[i];
  return ans;
}
int main() {
  vector<int> ans;
  int i, j, n, tmp;
  scanf("%d", &n);
  aa.clear();
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    aa.push_back(a[i]);
  }
  sort(aa.begin(), aa.end());
  vector<int>::iterator y = unique(aa.begin(), aa.end());
  aa.erase(y, aa.end());
  mp.clear();
  for (i = 0; i < aa.size(); i++) mp[aa[i]] = i + 1;
  for (i = 0; i < n; i++) a[i] = mp[a[i]];
  for (i = 0; i <= (1 << 17); i++) d[i] = 2000000000;
  for (i = n - 1; i >= 0; i--) {
    tmp = get(a[i] - 1);
    if (tmp == 2000000000)
      ans.push_back(-1);
    else
      ans.push_back(n - 1 - i - tmp - 1);
    add(a[i], n - 1 - i);
  }
  reverse(ans.begin(), ans.end());
  for (i = 0; i < ans.size(); i++) {
    if (i != 0) printf(" ");
    printf("%d", ans[i]);
  }
  printf("\n");
  return 0;
}
