#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  set<int> b;
  for (int i = 0; i < n; i++) b.insert(a[i]);
  int x[n];
  int d = n + 1;
  for (set<int>::iterator i = b.begin(); i != b.end(); i++) {
    for (int q = 0; q < n; q++) {
      if (a[q] == *(i)) {
        d--;
      }
    }
    for (int q = 0; q < n; q++) {
      if (a[q] == *(i)) {
        x[q] = d;
      }
    }
  }
  for (int i = 0; i < n; i++) cout << x[i] << " ";
  return 0;
}
