#include <bits/stdc++.h>
using std::bitset;
using std::cerr;
using std::cin;
using std::cout;
using std::deque;
using std::endl;
using std::fixed;
using std::ios_base;
using std::make_pair;
using std::make_tuple;
using std::map;
using std::nth_element;
using std::pair;
using std::queue;
using std::reverse;
using std::set;
using std::sort;
using std::stack;
using std::string;
using std::tuple;
using std::unordered_map;
using std::unordered_set;
using std::vector;
const int N = 100005;
const int INF = 1e9 + 7;
int n;
unordered_map<int, int> tree;
int a[N], b[N];
int get(int v) { return tree.find(v) == tree.end() ? -INF : tree[v]; }
void add(int v, int tl, int tr, int i, int x) {
  if (tr - tl == 1) {
    if (tree.find(v) == tree.end()) tree[v] = i;
    return;
  }
  int tm = (tl + tr) >> 1;
  x < tm ? add(2 * v + 1, tl, tm, i, x) : add(2 * v + 2, tm, tr, i, x);
  tree[v] = std::max(get(2 * v + 1), get(2 * v + 2));
}
int get(int v, int tl, int tr, int x) {
  if (tl >= x) return -INF;
  if (tr <= x) return get(v);
  int tm = (tl + tr) >> 1;
  return std::max(get(2 * v + 1, tl, tm, x), get(2 * v + 2, tm, tr, x));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = n - 1; i >= 0; --i) {
    int j = get(0, 0, INF, a[i]);
    if (j == -INF) {
      b[i] = -1;
    } else {
      b[i] = j - i - 1;
    }
    add(0, 0, INF, i, a[i]);
  }
  for (int i = 0; i < n; ++i) cout << b[i] << ' ';
  cout << '\n';
  return 0;
}
