#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 4e18;
const int inf = 2e9;
const int N = 1e5 + 5;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a * b / gcd(a, b); }
int a[N], ans[N], pos[N], maxi[N];
bool by(int i, int j) { return a[i] < a[j]; }
int main(void) {
  ios_base::sync_with_stdio(false);
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    pos[i] = i;
  }
  sort(pos, pos + n, by);
  for (i = 0; i < n; ++i) {
    maxi[i] = max(maxi[i - 1], pos[i]);
  }
  int bef = -1;
  for (i = 0; i < n; ++i) {
    if (a[pos[i]] != a[pos[i - 1]]) bef = i - 1;
    ans[pos[i]] = maxi[bef] - pos[i] - 1;
  }
  for (i = 0; i < n; ++i) printf(ans[i] < 0 ? "-1 " : "%d ", ans[i]);
  printf("\n");
  return 0;
}
