#include <bits/stdc++.h>
typedef struct {
  int num;
  int val;
  int rank;
} data;
int cnum(const void* a, const void* b) {
  return ((data*)a)->num - ((data*)b)->num;
}
int cval(const void* a, const void* b) {
  return ((data*)b)->val - ((data*)a)->val;
}
int main(void) {
  int i, n;
  data a[2000];
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    a[i].num = i;
    scanf("%d", &(a[i].val));
  }
  qsort(a, n, sizeof(data), cval);
  a[0].rank = 1;
  for (i = 1; i < n; i++) {
    if (a[i].val == a[i - 1].val) {
      a[i].rank = a[i - 1].rank;
    } else {
      a[i].rank = i + 1;
    }
  }
  qsort(a, n, sizeof(data), cnum);
  for (i = 0; i < n; i++) {
    printf("%d ", a[i].rank);
  }
  printf("\n");
  return 0;
}
