#include <bits/stdc++.h>
int rating[2001];
int rate(int a) {
  int res = 0;
  for (int i = a + 1; i < 2001; ++i) {
    res += rating[i];
  }
  return res;
}
int main() {
  int n;
  int d;
  int *stud;
  scanf("%d", &n);
  stud = new int[n];
  for (int i = 0; i < n; ++i) {
    scanf("%d", &d);
    ++rating[d];
    stud[i] = d;
  }
  for (int i = 0; i < n; ++i) {
    d = 1 + rate(stud[i]);
    printf("%d ", d);
  }
  return 0;
}
