#include <bits/stdc++.h>
using namespace std;
vector<int> st;
void init_st(int N) {
  int length = (int)(2 * pow(2.0, floor((log((double)N) / log(2.0)) + 1)));
  st.resize(length, 0);
}
void build_st(int code, int A[], int node, int b, int e) {
  if (b == e) {
    if (code == 0)
      st[node] = A[b];
    else
      st[node] = b;
  } else {
    int leftIdx = 2 * node, rightIdx = 2 * node + 1;
    build_st(code, A, leftIdx, b, (b + e) / 2);
    build_st(code, A, rightIdx, (b + e) / 2 + 1, e);
    int lContent = st[leftIdx], rContent = st[rightIdx];
    if (code == 0)
      st[node] = lContent + rContent;
    else {
      int lValue = A[lContent], rValue = A[rContent];
      if (code == 1)
        st[node] = (lValue <= rValue) ? lContent : rContent;
      else
        st[node] = (lValue >= rValue) ? lContent : rContent;
    }
  }
}
int query(int code, int A[], int node, int b, int e, int i, int j) {
  if (i > e || j < b) return -1;
  if (b >= i && e <= j) return st[node];
  int p1 = query(code, A, 2 * node, b, (b + e) / 2, i, j);
  int p2 = query(code, A, 2 * node + 1, (b + e) / 2 + 1, e, i, j);
  if (p1 == -1) return p2;
  if (p2 == -1) return p1;
  if (code == 0)
    return p1 + p2;
  else if (code == 1)
    return (A[p1] <= A[p2]) ? p1 : p2;
  else
    return (A[p1] >= A[p2]) ? p1 : p2;
}
int a[100010];
pair<int, int> a2[100010];
int ma[100010];
int ma2[100010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    a2[i].first = a[i];
    a2[i].second = i;
  }
  sort(a2, a2 + n);
  for (int i = 0; i < (n); ++i) {
    ma[i] = a2[i].second;
    ma2[i] = a2[i].first;
  }
  init_st(n);
  build_st(2, ma, 1, 0, n - 1);
  for (int i = 0; i < (n); ++i) {
    if (i > 0) cout << " ";
    int *p = lower_bound(ma2, ma2 + n, a[i]);
    if (p - ma2 <= 0) {
      cout << "-1";
    } else {
      int q = query(2, ma, 1, 0, n - 1, 0, p - ma2 - 1);
      if (ma[q] - i - 1 < 0)
        cout << "-1";
      else
        cout << ma[q] - i - 1;
    }
  }
  cout << "\n";
  return 0;
}
