#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> rating(n);
  vector<int> position(n, 1);
  vector<int> temp(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &rating[i]);
    temp[i] = rating[i];
  }
  sort(temp.begin(), temp.end());
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (temp[j] > temp[i]) {
        position[i]++;
      }
    }
  }
  map<int, int> res;
  for (int i = 0; i < temp.size(); i++) {
    res[temp[i]] = position[i];
  }
  for (int i = 0; i < n; i++) printf("%d ", res[rating[i]]);
  printf("\n");
}
