#include <bits/stdc++.h>
#pragma GCC optimize("-O2")
using namespace std;
void err(istream_iterator<string> it) { cerr << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << "\t";
  err(++it, args...);
}
template <typename T1, typename T2>
ostream& operator<<(ostream& c, pair<T1, T2>& v) {
  c << "(" << v.first << "," << v.second << ")";
  return c;
}
template <template <class...> class TT, class... T>
ostream& operator<<(ostream& out, TT<T...>& c) {
  out << "{ ";
  for (auto& x : c) out << x << " ";
  out << "}";
  return out;
}
const int LIM = 1e5 + 5, MOD = 1e9 + 7;
int t, n, m, k, x, y;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<int> v(n), c(n), ans(n);
  vector<vector<int> > pos(n, vector<int>(0));
  for (int i = 0; i < n; ++i) cin >> v[i], c[i] = v[i];
  sort(c.begin(), c.end());
  c.erase(unique(c.begin(), c.end()), c.end());
  for (int i = 0; i < n; ++i)
    v[i] = lower_bound(c.begin(), c.end(), v[i]) - c.begin(),
    pos[v[i]].push_back(i);
  priority_queue<int> pq;
  for (int i = 0; i < n; ++i) {
    int mx = -1;
    if (!pq.empty()) mx = pq.top();
    for (auto& it : pos[i]) {
      ans[it] = max(-1, mx - it - 1);
      pq.push(it);
    }
  }
  for (int i = 0; i < n; ++i) cout << ans[i] << " ";
  cout << '\n';
  return 0;
}
