#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<int> a(n), dp(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  dp[n - 1] = n - 1;
  for (int i = n - 2; i >= 0; i--) {
    dp[i] = dp[i + 1];
    if (a[i] < a[dp[i]]) {
      dp[i] = i;
    }
  }
  vector<int> res(n);
  for (int i = 0; i < n; i++) res[i] = a[dp[i]];
  for (int i = 0; i < n; i++) {
    int inx =
        lower_bound(res.begin() + i + 1, res.end(), a[i]) - res.begin() - 1;
    cout << inx - i - 1 << " ";
  }
  return 0;
}
