#include <bits/stdc++.h>
using namespace std;
int n;
int a[2005], b[2005], pos[2005];
bool cmp(int x, int y) { return x > y; }
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(a + 1, a + n + 1, cmp);
  int cnt = 1;
  for (int i = 1; i <= n; i++) {
    if (a[i] != a[i - 1]) {
      pos[a[i]] = cnt;
    }
    cnt++;
  }
  for (int i = 1; i <= n; i++) cout << pos[b[i]] << ' ';
  return 0;
}
