#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<pair<long long, long long> > tree[4 * N];
long long dist[N];
long long a[N];
vector<pair<long long, long long> > merge(
    vector<pair<long long, long long> > &left,
    vector<pair<long long, long long> > &right) {
  long long index = -1;
  vector<pair<long long, long long> > answer;
  int i = 0, j = 0;
  for (int k = 0; k < left.size() + right.size(); k++) {
    if (j != right.size() &&
        (i == left.size() || left[i].first > right[j].first)) {
      index = max(index, right[j].second);
      answer.push_back(right[j]);
      j++;
    } else {
      if (index != -1) {
        dist[left[i].second] =
            max(dist[left[i].second], index - left[i].second);
      }
      answer.push_back(left[i]);
      i++;
    }
  }
  return answer;
}
void build(int node, int l, int r) {
  if (l == r) {
    tree[node].push_back(pair<long long, long long>(a[l], l));
    return;
  }
  int mid = l + (r - l) / 2;
  build(node * 2, l, mid);
  build(node * 2 + 1, mid + 1, r);
  tree[node] = merge(tree[node * 2], tree[node * 2 + 1]);
}
int main() {
  int n;
  cin >> n;
  memset(dist, -1, sizeof(dist));
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  build(1, 0, n - 1);
  for (int i = 0; i < n; i++) {
    if (dist[i] != -1) dist[i]--;
    cout << dist[i] << ' ';
  }
  cout << endl;
  return 0;
}
