#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<pair<long long, long long> > v(n);
  vector<long long> ans(n, -1);
  for (unsigned long long i = 0; i < n; i++) {
    int x;
    cin >> x;
    v[i] = {x, i};
  }
  sort(v.begin(), v.end());
  priority_queue<pair<long long, long long> > pq;
  for (int i = 0; i < n; i++) {
    pq.push({v[i].second, v[i].first});
    ans[v[i].second] = pq.top().first - v[i].second - 1;
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
