#include <bits/stdc++.h>
using namespace std;
int b_search(int walruses[], int smallest[], int n, int pos) {
  int l = pos + 1;
  int r = n - 1;
  if (pos + 1 >= n) {
    return -1;
  }
  while (l <= r) {
    int mid = l + (r - l) / 2;
    if (smallest[mid] < walruses[pos]) {
      if (mid == n - 1) {
        return (mid - pos - 1);
      } else if (smallest[mid + 1] >= walruses[pos]) {
        return (mid - pos - 1);
      } else {
        l = mid + 1;
      }
    } else if (smallest[mid] >= walruses[pos]) {
      r = mid - 1;
    }
  }
  return -1;
}
int main(int argc, const char* argv[]) {
  int n;
  int walruses[100001];
  int smallest[100001];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &walruses[i]);
  }
  int smallest_so_far = walruses[n - 1];
  for (int i = n - 1; i >= 0; i--) {
    if (walruses[i] < smallest_so_far) {
      smallest_so_far = walruses[i];
      smallest[i] = smallest_so_far;
    } else {
      smallest[i] = smallest_so_far;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    printf("%d ", b_search(walruses, smallest, n, i));
  }
  printf("-1\n");
  return 0;
}
