#include <bits/stdc++.h>
using namespace std;
const long long N = 100005;
long long n, mn = INT_MAX;
vector<long long> ar, mar, ans;
long long bin(long long i) {
  long long l = i + 1, r = n - 1, ans;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (mar[mid] >= ar[i]) {
      r = mid - 1;
    } else {
      ans = mid;
      l = mid + 1;
    }
  }
  return ans;
}
void solve() {
  cin >> n;
  ar.resize(n);
  mar.resize(n);
  ans.resize(n);
  for (int i = 0; i < n; i++) cin >> ar[i];
  for (int i = n - 1; i >= 0; i--) {
    mar[i] = min(mn, ar[i]);
    mn = mar[i];
  }
  ans[n - 1] = -1;
  for (int i = 0; i < n - 1; i++) {
    if (mar[i] == ar[i]) {
      ans[i] = -1;
      continue;
    }
    long long t = bin(i);
    ans[i] = t - i - 1;
  }
  for (auto x : ans) cout << x << " ";
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
