#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, a[N], ans[N];
int b[N];
int ask(int x) {
  int ans = 0;
  for (; x; x -= x & -x) ans = max(ans, b[x]);
  return ans;
}
void add(int x, int c) {
  for (; x <= n; x += x & -x) b[x] = max(b[x], c);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    b[i] = a[i];
  }
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= n; i++) a[i] = lower_bound(b + 1, b + n + 1, a[i]) - b;
  memset(b, 0, sizeof(b));
  for (int i = n; i >= 1; i--) {
    ans[i] = ask(a[i] - 1);
    ans[i] = (ans[i] == 0 ? -1 : ans[i] - i - 1);
    add(a[i], i);
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
