#include <bits/stdc++.h>
using namespace std;
struct item {
  int x;
  int pos;
  item(int x, int pos) : x(x), pos(pos) {}
  item() : x(0), pos(0) {}
};
bool operator<(item a, item b) {
  return a.x < b.x || (a.x == b.x && a.pos < b.pos);
}
const int MAX_N = 100 * 1000 + 5;
const int shft = 2 * 100 * 1000 + 5;
const int MAX_T = shft * 2 + 5;
const int inf = 1 << 30;
int A[MAX_N], P[MAX_N];
item B[MAX_N];
int T[MAX_T];
vector<int> ans;
void upd(int pos, int x) {
  pos += shft;
  T[pos] = max(T[pos], x);
  pos /= 2;
  while (pos) {
    T[pos] = max(T[pos * 2], T[pos * 2 + 1]);
    pos /= 2;
  }
}
int get_max_pos(int l, int r) {
  if (l > r) return -1;
  l += shft;
  r += shft;
  int res = max(T[l], T[r]);
  while (l <= r) {
    res = max(res, T[l]);
    res = max(res, T[r]);
    l = (l + 1) / 2;
    r = (r - 1) / 2;
  }
  return res;
}
int main() {
  for (int i = 0; i < MAX_T; ++i) T[i] = -1;
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &A[i]), B[i] = item(A[i], i);
  sort(B, B + n);
  for (int i = 0; i < n; ++i)
    if (i > 0 && B[i - 1].x == B[i].x)
      P[B[i].pos] = P[B[i - 1].pos];
    else
      P[B[i].pos] = i;
  ans.reserve(n);
  for (int i = n - 1; i >= 0; --i) {
    int res = get_max_pos(0, P[i] - 1);
    upd(P[i], i);
    if (res == -1)
      ans.push_back(-1);
    else
      ans.push_back(res - i - 1);
  }
  for (int i = ans.size() - 1; i >= 0; --i) printf("%d ", ans[i]);
  return 0;
}
