#include <bits/stdc++.h>
using namespace std;
int n, num;
const int N = 2e3 + 20;
int arr0[N], arr1[N], arr2[N], cou = 1, cou0, m;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  m = n;
  for (int i = 0; i < n; i++) {
    cin >> arr0[i];
    arr1[i] = arr0[i];
  }
  sort(arr1, arr1 + n);
  m = unique(arr1, arr1 + m) - arr1;
  for (int i = m - 1; i >= 0; i--) {
    for (int j = 0; j < n; j++) {
      if (arr0[j] == arr1[i]) {
        arr2[j] = cou;
        cou0++;
      }
    }
    cou += cou0;
    cou0 = 0;
  }
  for (int i = 0; i < n; i++) {
    cout << arr2[i] << " ";
  }
}
