#include <bits/stdc++.h>
using namespace std;
int main() {
  int i = 0, j = 0, k = 0, tmp = 0, tmp1 = 0, tmp2 = 0, tmp3 = 0, tmp4 = 0,
      tmp5 = 0, flag = 0, T = 0, N = 0, Q = 0;
  cin >> N;
  vector<int> rate(2001, 0), rank(2001, 1);
  for (i = 1; i < N + 1; i++) {
    cin >> rate[i];
    int cur = 0;
    for (j = 1; j < i; j++)
      if (rate[j] < rate[i])
        rank[j]++;
      else if (rate[j] > rate[i])
        cur++;
    rank[i] = cur;
  }
  int min = 1;
  for (i = 1; i < N + 1; i++)
    if (rank[i] < min) min = rank[i];
  int er = 1 - min;
  for (i = 1; i < N + 1; i++) rank[i] += er;
  for (i = 1; i < N + 1; i++) cout << rank[i] << " ";
}
