#include <bits/stdc++.h>
using namespace std;
int arr[2005], arr1[2005], arr2[2005];
int main() {
  int t, ind = 1, count = 1;
  scanf("%d", &t);
  for (int i = 0; i < t; i++) {
    scanf("%d", &arr[i]);
    arr1[i] = arr[i];
  }
  sort(arr, arr + t);
  for (int i = t - 1; i >= 0; i--) {
    arr2[arr[i]] = ind;
    if (arr[i] == arr[i - 1] && i > 0)
      count++;
    else if (arr[i] != arr[i - 1] && i > 0) {
      ind = 1 + count;
      count++;
    }
  }
  for (int i = 0; i < t; i++) {
    printf("%d ", arr2[arr1[i]]);
  }
  printf("\n");
  return 0;
}
