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