#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void umax(T &x, T y) {
  if (y > x) x = y;
}
template <class T>
inline void umin(T &x, T y) {
  if (y < x) x = y;
}
const int N = 2e5 + 5, B = 0x7fffffff;
int st[4 * N];
pair<int, int> a[N];
int n;
int ans[N];
void upd(int l, int r, int id, int u) {
  if (l == r) {
    st[id] = u;
    return;
  }
  int mid = (l + r) >> 1;
  if (u <= mid)
    upd(l, mid, id << 1, u);
  else
    upd(mid + 1, r, id << 1 | 1, u);
  st[id] = max(st[id << 1], st[id << 1 | 1]);
}
int get(int l, int r, int id, int ql, int qr) {
  if (r < ql || l > qr) return 0;
  if (l >= ql && r <= qr) return st[id];
  int mid = (l + r) >> 1;
  return max(get(l, mid, id << 1, ql, qr),
             get(mid + 1, r, id << 1 | 1, ql, qr));
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i].first);
    a[i].second = i;
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    int pq = get(1, n, 1, a[i].second, n);
    ans[a[i].second] = (pq == 0 ? -1 : pq - a[i].second - 1);
    upd(1, n, 1, a[i].second);
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return !!0;
}
