#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3fffffff;
const int SINF = 0x7fffffff;
const long long LINF = 0x3fffffffffffffff;
const long long SLINF = 0x7fffffffffffffff;
const int MAXN = 100007;
struct wT {
  bool operator<(const wT &a) const {
    return ((age ^ a.age) ? (age < a.age) : (id > a.id));
  }
  int id, age;
} wal[MAXN];
int n;
int ans[MAXN];
set<int> s;
set<int>::iterator it;
void init();
void input();
void work();
int main() {
  init();
  input();
  work();
}
void init() { ios::sync_with_stdio(false); }
void input() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &wal[i].age), wal[i].id = n - i;
}
void work() {
  sort(wal, wal + n);
  s.insert(INF);
  for (int i = 0; i < n; ++i) {
    it = s.begin();
    if (*it < wal[i].id)
      ans[wal[i].id] = wal[i].id - *it - 1;
    else
      ans[wal[i].id] = -1;
    s.insert(wal[i].id);
  }
  for (int i = n; i > 0; --i) printf("%d ", ans[i]);
  putchar('\n');
}
