#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<pair<long long, long long> > v;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v.push_back({x, i});
  }
  sort(v.begin(), v.end());
  long long mx = 0;
  long long ans[n];
  for (long long i = 0; i < n; i++) {
    mx = max(mx, v[i].second);
    ans[v[i].second] = mx - v[i].second - 1;
  }
  for (long long i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
