#include <bits/stdc++.h>
using namespace std;
int const maxn = 100005;
int nums[maxn];
int a[maxn];
int tree[4 * maxn];
int sz = 1;
void init(int n) {
  while (sz < n) sz *= 2;
}
void change(int i, int x) {
  i += sz;
  tree[i] = x;
  for (i /= 2; i > 0; i /= 2) tree[i] = max(tree[2 * i], tree[2 * i + 1]);
}
int get(int l, int r) {
  int ans = 0;
  for (l += sz, r += sz; l <= r; l = (l + 1) / 2, r = (r - 1) / 2) {
    if (l & 1) ans = max(ans, tree[l]);
    if (!(r & 1)) ans = max(ans, tree[r]);
  }
  return ans;
}
int ans[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  int n = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  memcpy(nums, a, sizeof(a));
  nums[n] = -1;
  sort(nums, nums + n + 1);
  int cnt_nums = unique(nums, nums + n + 1) - nums;
  init(cnt_nums);
  for (int i = n - 1; i >= 0; --i) {
    int index = lower_bound(nums, nums + cnt_nums, a[i]) - nums;
    int tmp = get(0, index - 1);
    ans[i] = tmp > i ? tmp - i - 1 : -1;
    if (tree[index + sz] == 0) change(index, i);
  }
  for (int i = 0; i < n; ++i) cout << ans[i] << " \n"[i == n - 1];
  return 0;
}
