#include <bits/stdc++.h>
using namespace std;
int a[2222], b[2222];
map<int, int> M;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; cin >> a[i], b[i] = a[i], i++)
    ;
  sort(b, b + n);
  int p = 1;
  M[b[n - 1]] = p;
  int c = 1;
  for (int i = n - 2; i >= 0; i--) {
    if (b[i + 1] != b[i]) {
      p += c;
      c = 0;
      c++;
      M[b[i]] = p;
    } else
      c++;
  }
  for (int i = 0; i < n; i++) cout << M[a[i]] << " ";
  return 0;
}
