#include <bits/stdc++.h>
using namespace std;
struct s {
  int pos;
  int y;
  s(int _pos = 0, int _y = 0) : pos(_pos), y(_y) {}
};
vector<s> a;
int n;
int m;
vector<int> ans;
stack<int> st;
bool for_sort(s s1, s s2) { return s1.y < s2.y; }
int main() {
  cin >> n;
  a.resize(n);
  ans.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i].y;
    a[i].pos = i;
  }
  m = -1;
  sort(a.begin(), a.end(), for_sort);
  ans[a[0].pos] = -1;
  st.push(a[0].pos);
  for (int i = 1; i < n; ++i) {
    if (a[i].y == a[i - 1].y) {
      if (m == -1) {
        ans[a[i].pos] = -1;
      } else {
        if (a[i].pos > m) {
          ans[a[i].pos] = -1;
        } else {
          ans[a[i].pos] = m - a[i].pos - 1;
        }
      }
    } else {
      while (!st.empty()) {
        m = max(m, st.top());
        st.pop();
      }
      if (a[i].pos > m) {
        ans[a[i].pos] = -1;
      } else {
        ans[a[i].pos] = m - a[i].pos - 1;
      }
    }
    st.push(a[i].pos);
  }
  for (int i = 0; i < n; ++i) cout << ans[i] << ' ';
  cout << endl;
  return 0;
}
