#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int a[maxn];
pair<int, int> b[maxn];
int N;
template <class T>
T TINF() {
  throw exception();
}
template <>
int TINF<int>() {
  return 1000000001;
}
template <class T>
void buildTree(vector<T> &tree) {
  int len = 1;
  int N = tree.size();
  for (; len < N; len <<= 1)
    ;
  tree.resize(2 * len, TINF<T>());
  N = tree.size() / 2;
  for (int i = 0; i < N; ++i) tree[i + N] = tree[i];
  for (int i = N - 1; i; --i) tree[i] = min(tree[2 * i], tree[2 * i + 1]);
}
template <class T>
int request(const vector<T> &tree, int left, int right) {
  int N = tree.size() / 2;
  T ans = TINF<T>();
  left += N;
  right += N;
  while (left <= right) {
    if (left & 1) {
      if (ans > tree[left]) {
        ans = tree[left];
      }
    }
    if (!(right & 1)) {
      if (ans > tree[right]) {
        ans = tree[right];
      }
    }
    left = (left + 1) / 2;
    right = (right - 1) / 2;
  }
  return ans;
}
template <class T>
void update(vector<T> &tree, int index, T val) {
  int N = tree.size() / 2;
  index += N;
  tree[index] = val;
  for (int i = index / 2; i; i /= 2)
    tree[i] = min(tree[2 * i], tree[2 * i + 1]);
}
bool cmp(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.first < b.first) return true;
  if (a.first == b.first && a.second > b.second) return true;
  return false;
}
int main() {
  cin >> N;
  for (int _n(N), i(0); i < _n; i++) cin >> a[i];
  for (int _n(N), i(0); i < _n; i++) b[i] = make_pair(a[i], N - i - 1);
  sort(b, b + N, cmp);
  reverse(b, b + N);
  vector<int> tree(N);
  for (int _n(N), i(0); i < _n; i++) tree[i] = i;
  buildTree(tree);
  int ans[maxn];
  for (int _n(N), i(0); i < _n; i++) {
    int q = request(tree, 0, b[i].second - 1);
    update(tree, b[i].second, 1000000001);
    ans[N - 1 - b[i].second] = q == 1000000001 ? -1 : b[i].second - 1 - q;
  }
  for (int _n(N), i(0); i < _n; i++) {
    if (i) cout << ' ';
    cout << ans[i];
  }
  cout << endl;
  return 0;
}
