#include <bits/stdc++.h>
using namespace std;
unsigned long long int MOD = 1000000007;
unsigned long long int B = 13331;
bool cmp(const int &a, const int &b) { return a < b; }
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int lcm(int a, int b) { return a * (b / gcd(a, b)); }
int arr[200005];
int brr[200005];
int binary(int i, int j, int val) {
  if (i == j) {
    if (brr[i] < val) return i;
    return -1;
  }
  int mid = (i + j) >> 1;
  if (brr[mid] < val && brr[mid + 1] >= val) return mid;
  if (brr[mid] < val && brr[mid + 1] < val) return binary(mid + 1, j, val);
  if (brr[mid] >= val) return binary(i, mid, val);
}
int main() {
  int i, j, k, n;
  cin >> n;
  for (i = 0; i < n; i++) cin >> arr[i];
  brr[n - 1] = arr[n - 1];
  for (i = n - 2; i >= 0; i--) brr[i] = min(brr[i + 1], arr[i]);
  for (i = 0; i < n - 1; i++) {
    j = binary(i + 1, n - 1, arr[i]);
    if (j == -1)
      cout << -1 << ' ';
    else
      cout << j - i - 1 << ' ';
  }
  cout << -1;
  return 0;
}
