#include <bits/stdc++.h>
using namespace std;
bool comp(int x, int y) { return x > y; }
int n, i, j, A[2010], B[2020];
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> A[i];
    B[i] = A[i];
  }
  sort(B, B + n, comp);
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      if (A[i] == B[j]) {
        cout << j + 1 << " ";
        break;
      }
    }
  }
  cout << endl;
  return 0;
}
