#include <bits/stdc++.h>
using namespace std;
int T, n, ans[100010];
int a[100010];
struct node {
  int x, id;
  node(int _x, int _i) {
    x = _x;
    id = _i;
  }
  bool operator<(const node &a) const {
    if (x == a.x)
      return id > a.id;
    else
      return x < a.x;
  }
};
priority_queue<node> q;
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (register int i = 1; i <= n; ++i) q.push(node(a[i], i));
  for (register int i = 1; i <= n; ++i) ans[i] = -1;
  for (int i = n; i; --i) {
    while (!q.empty() && q.top().x > a[i]) {
      ans[q.top().id] = max(ans[q.top().id], i - q.top().id - 1);
      q.pop();
    }
  }
  for (register int i = 1; i <= n; ++i) cout << ans[i] << " ";
  return 0;
}
