#include <bits/stdc++.h>
using namespace std;
const int tope = 1e5 + 5;
int n;
vector<long long> menores;
vector<long long> edad;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  long long aux;
  cin >> aux;
  edad.push_back(aux);
  menores.resize(n);
  for (int i = 1; i < n; i++) {
    cin >> aux;
    edad.push_back(aux);
  }
  menores[n - 1] = edad[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    menores[i] = min(menores[i + 1], edad[i]);
  }
  for (int i = 0; i < n; i++) {
    if (edad[i] == menores[i]) {
      cout << "-1 ";
    } else {
      vector<long long>::iterator low;
      low = lower_bound(menores.begin(), menores.end(), edad[i]);
      int ind = low - menores.begin();
      cout << ((ind - 1) - i - 1) << " ";
    }
  }
  return 0;
}
