#include <bits/stdc++.h>
using namespace std;
struct node {
  int pr = (rand() << 15) + rand(), sz = 1, key;
  node* left = nullptr;
  node* right = nullptr;
  node(int k) : key(k) {}
};
int get_size(node* n) { return n ? n->sz : 0; }
void update(node* n) {
  if (n) n->sz = 1 + get_size(n->left) + get_size(n->right);
}
node* merge(node* left, node* right) {
  if (!left || !right) return left ? left : right;
  if (left->pr > right->pr) {
    left->right = merge(left->right, right);
    update(left);
    return left;
  } else {
    right->left = merge(left, right->left);
    update(right);
    return right;
  }
}
pair<node*, node*> split(node* n, int val) {
  if (!n) return {nullptr, nullptr};
  if (val >= n->key) {
    node *left, *right;
    tie(left, right) = split(n->right, val);
    n->right = left;
    update(n);
    return {n, right};
  } else {
    node *left, *right;
    tie(left, right) = split(n->left, val);
    n->left = right;
    update(n);
    return {left, n};
  }
}
node* insert(node* n, node* new_node) {
  if (!n) return new_node;
  if (n->pr < new_node->pr) {
    node *left, *right;
    tie(left, right) = split(n, new_node->key);
    new_node->left = left;
    new_node->right = right;
    update(new_node);
    return new_node;
  } else if (n->key >= new_node->key) {
    n->left = insert(n->left, new_node);
    update(n);
    return n;
  } else {
    n->right = insert(n->right, new_node);
    update(n);
    return n;
  }
}
vector<int> seg, a;
void build(int pos, int left, int right) {
  if (left == right)
    seg[pos] = a[left];
  else {
    int mid = (left + right) >> 1;
    build(pos * 2 + 1, left, mid);
    build(pos * 2 + 2, mid + 1, right);
    seg[pos] = min(seg[pos * 2 + 1], seg[pos * 2 + 2]);
  }
}
int get_lower(int pos, int left, int right, int bleft, int val) {
  if (right < bleft) return -1;
  if (seg[pos] >= val) return -1;
  if (left == right) return left;
  int mid = (left + right) >> 1;
  int pos_right = get_lower(pos * 2 + 2, mid + 1, right, bleft, val);
  if (pos_right == -1) return get_lower(pos * 2 + 1, left, mid, bleft, val);
  return pos_right;
}
int main() {
  srand(time(0));
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  a.resize(n);
  seg.resize(n * 4);
  for (auto& elem : a) cin >> elem;
  build(0, 0, n - 1);
  for (int i = 0; i < n; i++) {
    int pos_lower = get_lower(0, 0, n - 1, i, a[i]);
    if (pos_lower == -1)
      cout << pos_lower;
    else
      cout << pos_lower - i - 1;
    cout << " ";
  }
}
