#include <bits/stdc++.h>
using namespace std;
ifstream fin("input.txt");
ofstream fout("ofput.txt");
using namespace std;
inline void R(int &x) { scanf("%d", &x); }
inline void P(int x) { printf("%d", x); }
inline void P(char x) { printf("%c", x); }
template <typename T>
vector<T> read_v(int n) {
  vector<T> v(n);
  for (int i = 0; i < n; i++) fin >> v[i];
  return v;
}
bool decrease(int a, int b) { return (a > b); }
struct pr {
  int f, s;
};
struct tr {
  int f, s, t;
};
bool comp(pr a, pr b) { return (a.f < b.f); }
vector<pr> mini;
int bin(int n) {
  int l = -1, r = mini.size();
  while (l + 1 < r) {
    int m = (l + r) / 2;
    if (mini[m].f < n)
      r = m;
    else
      l = m;
  }
  if (r != mini.size() && mini[r].f < n)
    return mini[r].s;
  else
    return -1;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  R(n);
  vector<int> v(n);
  for (int i = 0; i < n; i++) R(v[i]);
  vector<int> r(n);
  mini.push_back({v[n - 1], n - 1});
  r[n - 1] = -1;
  for (int i = ((n - 1) - 1); i > -1; i--) {
    int b = bin(v[i]);
    r[i] = b == -1 ? -1 : b - i - 1;
    if (v[i] < mini.back().f) mini.push_back({v[i], i});
  }
  for (int x : r) P(x), P(' ');
  return 0;
}
