#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 7;
int n;
vector<pair<long long, int> > v;
int result[MAX];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  set<int> s;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    long long a;
    cin >> a;
    v.push_back(make_pair(a, i));
  }
  sort(v.begin(), v.end());
  s.insert(-1);
  for (int i = 0; i < n; ++i) {
    int cntIndex = v[i].second;
    int mxPastIndex = *s.rbegin();
    if (mxPastIndex - cntIndex - 1 >= 0) {
      result[cntIndex] = mxPastIndex - cntIndex - 1;
    } else {
      result[cntIndex] = -1;
    }
    s.insert(cntIndex);
  }
  for (int i = 1; i <= n; ++i) {
    cout << result[i] << " ";
  }
  cout << "\n";
  return 0;
}
