#include <bits/stdc++.h>
using namespace std;
map<int, int> _map;
int ar[100000 + 5], tree[4 * 100000 + 5], ans[100000 + 5];
vector<int> v;
void update(int idx, int st, int ed, int s, int p) {
  if (st >= s && ed <= s) {
    tree[idx] = max(tree[idx], p);
    return;
  }
  int mid = (st + ed) >> 1;
  int l = idx << 1;
  int r = l + 1;
  if (mid >= s) update(l, st, mid, s, p);
  if (mid < s) update(r, mid + 1, ed, s, p);
  tree[idx] = max(tree[l], tree[r]);
}
int query(int idx, int st, int ed, int s, int e) {
  if (st >= s && ed <= e) {
    return tree[idx];
  }
  int mid = (st + ed) >> 1;
  int l = idx << 1;
  int r = l + 1;
  int p1 = 0, p2 = 0;
  if (mid >= s) p1 = query(l, st, mid, s, e);
  if (mid < e) p2 = query(r, mid + 1, ed, s, e);
  return max(p1, p2);
}
int main() {
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &ar[i]);
    v.push_back(ar[i]);
  }
  int idx = 1;
  sort(v.begin(), v.end());
  _map[v[0]] = ++idx;
  for (i = 1; i < n; i++) {
    if (v[i] != v[i - 1]) _map[v[i]] = ++idx;
  }
  ans[n - 1] = -1;
  update(1, 1, idx, _map[ar[n - 1]], n - 1);
  for (i = n - 2; i >= 0; i--) {
    int pos = query(1, 1, idx, 1, _map[ar[i]] - 1);
    if (pos == 0) pos = i;
    ans[i] = pos - i - 1;
    update(1, 1, idx, _map[ar[i]], i);
  }
  printf("%d", ans[0]);
  for (i = 1; i < n; i++) printf(" %d", ans[i]);
  printf("\n");
  return 0;
}
