#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
struct SegTree {
  int n, *v;
  int t[4 * MAXN];
  int neutral = 0;
  int join(int a, int b) { return max(a, b); }
  void build(int node, int i, int j) {
    if (i == j) {
      t[node] = v[i];
    } else {
      int mid = i + (j - i) / 2;
      build((node << 1), i, mid);
      build(((node << 1) + 1), mid + 1, j);
      t[node] = join(t[(node << 1)], t[((node << 1) + 1)]);
    }
  }
  void update(int node, int i, int j, int index, int value) {
    if (i == j) {
      t[node] = v[index] = value;
    } else {
      int mid = i + (j - i) / 2;
      if (index <= mid)
        update((node << 1), i, mid, index, value);
      else
        update(((node << 1) + 1), mid + 1, j, index, value);
      t[node] = join(t[(node << 1)], t[((node << 1) + 1)]);
    }
  }
  int query(int node, int i, int j, int l, int r) {
    if (l <= i && j <= r) return t[node];
    if (i > r || l > j) return neutral;
    int mid = i + (j - i) / 2;
    return join(query((node << 1), i, mid, l, min(r, mid)),
                query(((node << 1) + 1), mid + 1, j, max(l, mid + 1), r));
  }
  void build(int _v[], int _n) {
    n = _n;
    v = _v;
    build(1, 1, n);
  }
  void update(int index, int value) { update(1, 1, n, index, value); }
  int query(int a, int b) { return query(1, 1, n, a, b); }
};
int n;
int v[MAXN], a[MAXN];
SegTree st;
vector<int> C;
unordered_map<int, int> m;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> v[i];
    C.push_back(v[i]);
  }
  sort((C).begin(), (C).end());
  int ind = 0;
  for (int x : C) {
    if (!m[x]) {
      m[x] = ++ind;
    }
  }
  st.build(a, n);
  vector<int> ans;
  for (int i = n; i >= 1; --i) {
    int c = m[v[i]];
    int ret = st.query(1, c - 1);
    if (ret == 0) {
      ans.push_back(-1);
    } else {
      ans.push_back(ret - i - 1);
    }
    if (st.query(c, c) == 0) {
      st.update(c, i);
    }
  }
  reverse((ans).begin(), (ans).end());
  for (int x : ans) {
    cout << x << " ";
  }
  cout << "\n";
  return 0;
}
