#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000 + 5;
int main() {
  int n;
  cin >> n;
  int realarr[MAXN];
  int arr[MAXN];
  for (int i = 0; i < n; i++) {
    cin >> realarr[i];
    arr[i] = realarr[i];
  }
  sort(arr, arr + n, greater<int>());
  int order[MAXN];
  order[0] = 1;
  int cnt = 2;
  for (int i = 1; i < n; i++) {
    if (arr[i] == arr[i - 1]) {
      order[i] = order[i - 1];
    } else {
      order[i] = cnt;
    }
    cnt++;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (realarr[i] == arr[j]) {
        cout << order[j] << " ";
        break;
      }
    }
  }
  return 0;
}
