#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n], b[n], c[n];
  int i, j = 0, k = 1;
  map<int, int> mp;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(a, a + n, greater<int>());
  for (i = 0; i < n - 1; i++) {
    mp[a[i]] = k;
    j++;
    if (a[i] != a[i + 1]) {
      k += j;
      j = 0;
    }
  }
  mp[a[i]] = k;
  for (i = 0; i < n; i++) {
    cout << mp[b[i]] << " ";
  }
}
