#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 5 * 1e5 + 1;
const int mod = 1e9 + 7;
ll n, a[N], mn[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  mn[n] = INT_MAX;
  for (int i = n - 1; i > -1; i--) {
    mn[i] = min(mn[i + 1], a[i]);
  }
  for (int i = 0; i < n; i++) {
    ll ans = -1;
    ll low = i - 1, high = n;
    while (low + 1 < high) {
      ll mid = low + high >> 1;
      if (mn[mid] < a[i]) {
        low = mid;
        ans = mid - i - 1;
      } else
        high = mid;
    }
    cout << ans << " ";
  }
  return 0;
}
