#include <bits/stdc++.h>
using namespace std;
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
const int MxN = 1e5 + 5;
int dp[15][MxN + 5];
class TurntableService {
  int sz;
  int maxSum;
  vector<set<int> > favs;
  int minDis(int i, int j) {
    if (i > j) swap(i, j);
    return min(j - i, i - j + sz);
  }

 public:
  int solve(int i, int sum, int counter) {
    if (sum == maxSum) {
      return 0;
    }
    if (dp[i][sum] != -1) return dp[i][sum];
    int new_sum = sum;
    int c = 0;
    for (int j = 1; j <= maxSum && c < sz; j = (j << 1)) {
      bool exists = (favs[c].find((i + c) % sz) != favs[c].end());
      if (exists) new_sum = (new_sum | j);
      c++;
    }
    if (sum == new_sum) return 2450;
    if (new_sum == maxSum) {
      return 15;
    }
    int ans = INT_MAX, op1 = 2450, op2 = 2450;
    for (int j = 0; j < sz; j++) {
      int stepsCost = minDis(j, i) + 1;
      if (i == j) continue;
      op2 = solve(j, new_sum, 0) + stepsCost + 15;
      ans = min(ans, min(op1, op2));
    }
    return dp[i][sum] = ans;
  }
  int calculateTime(vector<string> fav) {
    sz = fav.size();
    maxSum = binpow(2, sz) - 1;
    memset(dp, -1, sizeof(dp));
    favs.assign(sz + 1, set<int>());
    for (int i = 0; i < fav.size(); i++) {
      int k = 0;
      for (int j = 0; j < fav[i].size(); j++) {
        if (fav[i][j] == ' ') {
          favs[i].insert(k);
          k = 0;
        } else {
          k = k * 10;
          k += fav[i][j] - '0';
        }
      }
      favs[i].insert(k);
    }
    int new_sum = 0;
    int c = 0;
    for (int j = 1; j <= maxSum && c < sz; j = (j << 1)) {
      bool exists = (favs[c].find((0 + c) % sz) != favs[c].end());
      if (exists) new_sum = (new_sum | j);
      c++;
    }
    int ans = 2450;
    ans = min(solve(0, 0, 0), ans);
    for (int i = 1; i < sz; i++) ans = min(ans, solve(i, 0, 0) + i + 1);
    return ans;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  priority_queue<pair<int, int> > PQ;
  int n;
  cin >> n;
  vector<int> v(n);
  vector<int> ans(n, -1);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    PQ.push(make_pair(v[i], i));
  }
  for (int i = n - 1; i >= 0; i--) {
    while (!PQ.empty()) {
      pair<int, int> a = PQ.top();
      if (a.second == i) {
        ans[a.second] = -1;
      } else if (a.first > v[i]) {
        ans[a.second] = i - a.second - 1;
      } else {
        break;
      }
      PQ.pop();
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
}
