#include <bits/stdc++.h>
using namespace std;
struct stu {
  int id, s, pos;
} arr[2048];
bool comp(stu a, stu b) { return a.id < b.id; }
bool comp2(stu a, stu b) { return a.s > b.s; }
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i].s;
    arr[i].id = i;
    arr[i].pos = 1;
  }
  sort(arr, arr + n, comp2);
  int lst = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i].s == arr[lst].s)
      arr[i].pos = arr[lst].pos;
    else {
      lst = i;
      arr[i].pos = i + 1;
    }
  }
  sort(arr, arr + n, comp);
  for (int i = 0; i < n; i++) {
    cout << arr[i].pos << " ";
  }
  return 0;
}
