#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int rte[2010];
  int pst[2010];
  int pep[2010];
  cin >> n;
  memset(pep, 0, sizeof(pep));
  for (int i = 1; i <= n; i++) {
    cin >> rte[i];
    pep[rte[i]]++;
  }
  int pos = 1;
  for (int i = 2000; i >= 0; i--) {
    if (pep[i] > 0) {
      pos += pep[i];
      pep[i] = pos - pep[i];
    }
  }
  cout << pep[rte[1]];
  for (int i = 2; i <= n; i++) {
    cout << " " << pep[rte[i]];
  }
  cout << endl;
  return 0;
}
