#include <bits/stdc++.h>
using namespace std;
typedef struct Node {
  int data;
  int low;
  int high;
  Node *left;
  Node *right;
  Node *fa;
} Node;
int gt;
int a[100005];
int d[100005];
Node fen[1000000];
int ft = 0;
int min(int a, int b) { return a < b ? a : b; }
Node *build(int low, int high) {
  Node *head = &fen[ft++];
  if (head == NULL) {
    cout << "error" << endl;
    exit(0);
  }
  head->data = 200000000;
  head->low = low;
  head->high = high;
  head->fa = NULL;
  if (low == high) {
    head->left = NULL;
    head->right = NULL;
    return head;
  }
  head->left = build(low, (low + high) / 2);
  head->left->fa = head;
  head->right = build((low + high) / 2 + 1, high);
  head->right->fa = head;
  return head;
}
Node *search(Node *head, int qujian) {
  if (head == NULL) {
    return NULL;
  }
  if (head->low == qujian && head->high == qujian) {
    return head;
  }
  if (head->left->high < qujian) {
    return search(head->right, qujian);
  } else {
    return search(head->left, qujian);
  }
}
void add(Node *head, int qujian, int data) {
  Node *p = search(head, qujian);
  p->data = data;
  while (p->fa != NULL) {
    p = p->fa;
    p->data = min(p->left->data, p->right->data);
  }
}
int getdata(Node *head, int low, int high) {
  gt++;
  if (head == NULL) {
    return 200000000;
  }
  if (head->low == head->high) {
    return head->data;
  }
  if (low > head->left->high) {
    return getdata(head->right, low, high);
  } else if (high < head->right->low) {
    return getdata(head->left, low, high);
  } else if (high == head->right->high) {
    return min(getdata(head->left, low, head->left->high), head->right->data);
  } else if (low == head->left->low) {
    return min(getdata(head->right, head->right->low, high), head->left->data);
  }
  {
    return min(getdata(head->left, low, head->left->high),
               getdata(head->right, head->right->low, high));
  }
}
int main() {
  int n;
  while (cin >> n) {
    int time1 = clock();
    if (n == 71864) {
    }
    int i;
    for (i = 0; i < n; i++) {
      cin >> a[i];
    }
    Node *head = build(0, n - 1);
    if (n == 71864) {
      int time2 = clock();
      time1 = time2;
    }
    for (i = 0; i < n; i++) {
      if (n == 71864 && i % 100 == 0 && clock() - time1 > 100) {
      }
      add(head, i, a[i]);
    }
    if (n == 71864) {
    }
    int ss;
    time1 = clock();
    for (i = 0; i < n; i++) {
      if (i % 10 == 0 && n == 71864) {
      }
      int low = i + 1;
      int high = n - 1;
      int dd = -1;
      int st = 0;
      while (low < high) {
        if (st == 5 && n == 71864) {
        }
        int mid = (low + high) / 2;
        gt = 0;
        int tt = getdata(head, mid + 1, high);
        int yy = getdata(head, low, mid);
        if (n == 71864) {
        }
        if (tt < a[i]) {
          low = mid + 1;
        } else if (yy < a[i]) {
          high = mid;
        } else {
          break;
        }
        st++;
      }
      if (n == 71864) {
      }
      if (low == high && getdata(head, low, high) < a[i]) {
        dd = high - i - 1;
      }
      if (i == 0) {
        cout << dd;
      } else {
        cout << " " << dd;
      }
    }
    cout << endl;
  }
  return 0;
}
