#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1e5;
int n;
int num[MaxN + 5], a[MaxN + 5], pos[MaxN + 5];
int ans[MaxN + 5];
int main() {
  while (~scanf("%d", &n) && n) {
    int tail = 0;
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = n; i >= 1; i--) {
      if (tail == 0 || num[tail] >= a[i]) {
        num[++tail] = a[i];
        pos[tail] = i;
        ans[i] = -1;
      } else {
        int l, r, mid;
        l = 1, r = tail;
        while (l < r) {
          mid = (l + r) / 2;
          if (num[mid] < a[i])
            r = mid;
          else
            l = mid + 1;
        }
        ans[i] = pos[r] - i - 1;
      }
    }
    for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
    printf("\n");
    memset(ans, 0, sizeof(ans));
    memset(num, 0, sizeof(num));
  }
}
