#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
pair<long long, long long> Roots(double a, double b, double c) {
  double d = (b * b) - (4 * a * c);
  if (d < -1e-9) return {-1e9, -1e9};
  pair<long long, long long> res;
  res.first = ((-b) + sqrt(d)) / (2 * a) + 0.99999;
  res.second = ((-b) - sqrt(d)) / (2 * a) + 0.99999;
  return res;
}
long double pointLineDist(const complex<long double>& a,
                          const complex<long double>& b,
                          const complex<long double>& p) {
  if (((((conj(((b) - (a))) * (((b) - (a)))).real())) < 1e-9))
    return hypot(a.real() - p.real(), a.imag() - p.imag());
  return fabs(((conj(((b) - (a))) * (((p) - (a)))).imag()) /
              ((long double)hypot((((b) - (a))).imag(), (((b) - (a))).real())));
}
long double pointLineDist(const complex<long double>& a,
                          const complex<long double>& b,
                          const complex<long double>& p,
                          complex<long double>& nearestPoint) {
  if (((((conj(((b) - (a))) * (((b) - (a)))).real())) < 1e-9)) {
    nearestPoint = a;
    return hypot(a.real() - p.real(), a.imag() - p.imag());
  }
  complex<long double> u = ((b) - (a));
  complex<long double> v = ((p) - (a));
  nearestPoint = a + ((((conj(v) * (u)).real()) /
                       ((long double)hypot((u).imag(), (u).real()))) *
                      ((u) / ((long double)hypot((u).imag(), (u).real()))));
  return ((long double)hypot((((p) - (nearestPoint))).imag(),
                             (((p) - (nearestPoint))).real()));
}
long long getTime(long long a, long long b, long long c) {
  for (long long i = 1;; i++) {
    if (a * i * i + b * i + c <= 0) return i;
  }
}
long double pointSegmentDist(const complex<long double>& a,
                             const complex<long double>& b,
                             const complex<long double>& p,
                             complex<long double>& nearestPoint) {
  if (((conj(((b) - (a))) * (((p) - (a)))).real()) < 1e-9) {
    nearestPoint = a;
    return ((long double)hypot((((p) - (a))).imag(), (((p) - (a))).real()));
  }
  if (((conj(((a) - (b))) * (((p) - (b)))).real()) < 1e-9) {
    nearestPoint = b;
    return ((long double)hypot((((p) - (b))).imag(), (((p) - (b))).real()));
  }
  return pointLineDist(a, b, p, nearestPoint);
}
double toRadians(double degree) { return degree * pi / 180; }
bool intersect(const complex<long double>& a, const complex<long double>& b,
               const complex<long double>& p, const complex<long double>& q,
               complex<long double>& ret) {
  long double d1 = ((conj(p - a) * (b - a)).imag());
  long double d2 = ((conj(q - a) * (b - a)).imag());
  ret = (d1 * q - d2 * p) / (d1 - d2);
  if (fabs(d1 - d2) > 1e-9) return 1;
  return 0;
}
bool pointOnLine(const complex<long double>& a, const complex<long double>& b,
                 const complex<long double>& p) {
  return fabs(((conj(((b) - (a))) * (((p) - (a)))).imag())) < 1e-9;
}
namespace std {
bool operator<(const complex<long double>& a, const complex<long double>& b) {
  return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
}  // namespace std
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  set<pair<int, int>, greater<pair<int, int>>> mySet;
  int n;
  cin >> n;
  vector<int> arr(n), ans(n, -1);
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = n - 1; i > -1; i--) {
    auto it = mySet.upper_bound({arr[i], -1});
    if (it == mySet.end()) {
      mySet.insert({arr[i], i});
    } else {
      ans[i] = it->second - i - 1;
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " \n"[i == n - 1];
}
