#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 500;
const long long mod = 1e9 + 7;
const long long INF = 1000000000;
int dx[9] = {-15 - 1, -1, 0, 1, 1, 1, 0, 0};
int dy[9] = {-1, 0, 1, 1, 1, 0, -1, -1, 0};
bool compare(const pair<long long, long long>& i,
             const pair<long long, long long>& j) {
  return i.second < j.second;
}
long long fact[N];
void pre() {}
long long modexp(long long x, long long n) {
  long long r = 1;
  while (n) {
    if (n & 1) r = (r * x) % mod;
    x = (x * x) % mod;
    n >>= 1;
  }
  return r;
}
long long modinv(long long x) { return modexp(x, mod - 2); }
long long ncr(long long n, long long r) {
  if (n < r) return 0;
  long long ans =
      (fact[n] % mod * modinv(fact[r]) % mod * modinv(fact[n - r]) % mod) % mod;
  return ans;
}
void solve() {
  int n;
  cin >> n;
  long long A[n + 2];
  for (int i = 1; i <= n; i++) cin >> A[i];
  reverse(A + 1, A + n + 1);
  long long B[n + 2];
  B[0] = 1000000000;
  for (int i = 1; i <= n; i++) {
    B[i] = min(B[i - 1], A[i]);
  }
  reverse(A + 1, A + n + 1);
  reverse(B + 1, B + n + 1);
  for (int i = 1; i <= n; i++) {
    if (lower_bound(B + i, B + n + 1, A[i]) - (B + i) - 2 < 0)
      cout << -1 << " ";
    else
      cout << lower_bound(B + i, B + n + 1, A[i]) - (B + i) - 2 << " ";
  }
  cout << "\n";
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  for (int i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
