#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n + 1], b[n + 1];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(b, b + n, greater<int>());
  int mx = b[0];
  int rank = 1, people = 0;
  int ranks[n + 1], h = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (a[j] == mx) {
        ranks[j] = rank;
        people++;
      }
    }
    rank += people;
    h += people;
    people = 0;
    mx = b[h];
  }
  for (int i = 0; i < n; i++) cout << ranks[i] << " ";
  return 0;
}
