#include <bits/stdc++.h>
int main() {
  int n, i, j, c = 0, a[2000];
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      if (a[j] > a[i]) c++;
    }
    printf("%d\t", (c + 1));
    c = 0;
  }
  return 0;
}
