#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int n;
int a[200100];
vector<int> v;
int tree[800100];
int ans[100100];
void update(int k, int l, int r, int pos, int val) {
  if (l == r) {
    tree[k] = max(tree[k], val);
    return;
  }
  int m = (l + r) / 2;
  if (pos <= m)
    update(k * 2 + 1, l, m, pos, val);
  else
    update(k * 2 + 2, m + 1, r, pos, val);
  tree[k] = max(tree[k * 2 + 1], tree[k * 2 + 2]);
}
int query(int k, int l, int r, int aa, int b) {
  if (aa > b) return -1;
  if (aa <= l && r <= b) {
    return tree[k];
  }
  int m = (l + r) / 2, res = -1;
  if (aa <= m) res = max(res, query(k * 2 + 1, l, m, aa, b));
  if (m < b) res = max(res, query(k * 2 + 2, m + 1, r, aa, b));
  return res;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < n; i++) v.push_back(a[i]);
  sort(v.begin(), v.end());
  int k = unique(v.begin(), v.end()) - v.begin();
  for (int i = 0; i < n; i++)
    a[i] = lower_bound(v.begin(), v.begin() + k, a[i]) - v.begin();
  memset(tree, -1, sizeof(tree));
  for (int i = n - 1; i >= 0; i--) {
    int res = query(0, 0, k - 1, 0, a[i] - 1);
    if (res == -1)
      ans[i] = -1;
    else
      ans[i] = res - i - 1;
    update(0, 0, k - 1, a[i], i);
  }
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
  return 0;
}
