#include <bits/stdc++.h>
using namespace std;
struct node {
  int pos, val, ans;
} arr[100005];
bool cmp(node a, node b) {
  if (a.val == b.val) return a.pos < b.pos;
  return a.val < b.val;
}
bool cmp2(node a, node b) { return a.pos < b.pos; }
int n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &arr[i].val);
    arr[i].pos = i;
  }
  sort(arr + 1, arr + n + 1, cmp);
  int max1 = -1;
  for (int i = 1; i <= n; ++i) {
    arr[i].ans = max(max1, arr[i].pos) - arr[i].pos;
    max1 = max(max1, arr[i].pos);
  }
  sort(arr + 1, arr + n + 1, cmp2);
  for (int i = 1; i <= n; ++i) {
    printf("%d ", arr[i].ans - 1);
  }
  return 0;
}
