#include <bits/stdc++.h>
using namespace std;
pair<int, int> b[100001];
int a[100001], ans[100001], s[100001 * 5];
int n;
inline void checkmax(int &a, int b) {
  if (b > a) a = b;
}
int get(int i, int l, int r, int d, int c) {
  if (l == d && r == c) return s[i];
  int g = (l + r) >> 1;
  int con1 = i << 1;
  int con2 = con1 + 1;
  int ans = -1;
  if (d <= g) checkmax(ans, get(con1, l, g, d, min(g, c)));
  if (c > g) checkmax(ans, get(con2, g + 1, r, max(g + 1, d), c));
  return ans;
}
void update(int i, int l, int r, int pos) {
  if (l == r) {
    s[i] = l;
    return;
  }
  int g = (l + r) >> 1;
  int con1 = i << 1;
  int con2 = con1 + 1;
  if (pos <= g)
    update(con1, l, g, pos);
  else
    update(con2, g + 1, r, pos);
  s[i] = max(s[con1], s[con2]);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    b[i] = make_pair(a[i], i);
  }
  sort(b + 1, b + n + 1);
  memset(s, -1, sizeof(s));
  for (int i = 1; i <= n; i++) {
    ans[b[i].second] = get(1, 1, n, b[i].second + 1, n);
    update(1, 1, n, b[i].second);
  }
  for (int i = 1; i <= n; i++)
    if (ans[i] != -1)
      printf("%d ", ans[i] - i - 1);
    else
      printf("-1 ");
  return 0;
}
