#include <bits/stdc++.h>
#pragma GCC optimize("O3")
const double pi = acos(-1);
const int MOD = 1e9 + 7;
const int INF = 1e9 + 7;
const int MAXN = 1e6 + 5;
const double eps = 1e-9;
using namespace std;
int a[MAXN];
int tree[4 * MAXN];
void build(int l, int r, int k) {
  tree[k] = -1;
  if (l == r) return;
  int m = (l + r) / 2;
  build(l, m, k << 1);
  build(m + 1, r, k << 1 | 1);
}
void upd(int l, int r, int k, int a, int v) {
  if (a < l || r < a) return;
  if (a <= l && r <= a) {
    tree[k] = max(tree[k], v);
    return;
  }
  int m = (l + r) / 2;
  upd(l, m, k << 1, a, v);
  upd(m + 1, r, k << 1 | 1, a, v);
  tree[k] = max(tree[k << 1], tree[k << 1 | 1]);
}
int qry(int l, int r, int k, int a) {
  if (a < 1) return -1;
  if (a < l || r < 1) return -1;
  if (1 <= l && r <= a) return tree[k];
  int m = (l + r) / 2;
  return max(qry(l, m, k << 1, a), qry(m + 1, r, k << 1 | 1, a));
}
int main() {
  int n;
  scanf("%d", &(n));
  build(0, n, 1);
  vector<int> tmp;
  for (int i = 0; i < n; i++) {
    scanf("%d", &(a[i]));
    tmp.push_back(a[i]);
  }
  sort(tmp.begin(), tmp.end());
  for (int i = n - 1; i >= 0; i--) {
    a[i] = lower_bound(tmp.begin(), tmp.end(), a[i]) - tmp.begin() + 1;
    int val = qry(0, n, 1, a[i] - 1);
    upd(0, n, 1, a[i], i);
    if (val == -1)
      a[i] = -1;
    else
      a[i] = val - i - 1;
  }
  for (int i = 0; i < n; i++) printf("%d ", a[i]);
  printf("\n");
  return 0;
}
