#include <bits/stdc++.h>
using namespace std;
long long int n;
long long int arr[200100];
struct node {
  long long int x;
  node(long long int m = 0) { x = m; }
};
node t[800400];
node merge(node a, node b) { return node(min(a.x, b.x)); }
void build(int index, int l, int r) {
  if (l == r) {
    t[index] = node(arr[l]);
    return;
  }
  int mid = (l + r) / 2;
  build(2 * index, l, mid);
  build(2 * index + 1, mid + 1, r);
  t[index] = merge(t[2 * index], t[2 * index + 1]);
}
int query(int index, int l, int r, int val) {
  if (t[index].x >= val) return -1;
  if (l == r) return l;
  int mid = (l + r) / 2;
  if (t[2 * index].x < val)
    return query(2 * index, l, mid, val);
  else
    return query(2 * index + 1, mid + 1, r, val);
}
void solve() {
  cin >> n;
  int h[n];
  for (int i = 0; i < (n); i++) cin >> h[i];
  for (int i = 0; i < (n); i++) arr[i] = h[n - 1 - i];
  build(1, 0, n - 1);
  int ans[n];
  for (int i = 0; i < (n); i++) {
    node temp = query(1, 0, n - 1, h[i]);
    if (temp.x == -1 || temp.x + 1 + i + 1 > n)
      ans[i] = -1;
    else {
      int k = n - 1 - temp.x;
      ans[i] = k - i - 1;
    }
  }
  for (int i = 0; i < (n); i++) cout << ans[i] << " ";
  cout << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
