#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  int N[2005], A[2005];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    N[i] = a;
  }
  for (int i = 0; i < n; i++) {
    int cont = 0;
    for (int j = 0; j < n; j++) {
      if (i != j && N[i] < N[j]) cont++;
    }
    A[i] = 1 + cont;
  }
  for (int i = 0; i < n; i++) {
    if (i != n - 1)
      cout << A[i] << " ";
    else
      cout << A[i] << endl;
  }
  return 0;
}
