#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool isperfect(long long n) {
  long long y = sqrt(n);
  if (n % y == 0 && y * y == n) return true;
  return false;
}
bool comp(pair<long long, long long> a, pair<long long, long long> b) {
  return a.second < b.second;
}
long long powi(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) ans = ans * a;
    b = b >> 1;
    a = a * a;
  }
  return ans;
}
int main() {
  long long n;
  cin >> n;
  vector<long long int> v(n);
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    m[v[i]] = i;
  }
  long long mini[n];
  mini[n - 1] = v[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    mini[i] = min(v[i], mini[i + 1]);
  }
  for (int i = 0; i < n; i++) {
    cout << lower_bound(mini + i + 1, mini + n, v[i]) - (mini + i + 2) << " ";
  }
}
