#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v;
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int tem;
    cin >> tem;
    v.push_back(tem);
  }
  map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    int val = v[i];
    if (mp[val] != 0) {
      cout << mp[val] << ' ';
    } else {
      int count = 1;
      for (int j = 0; j < n; ++j) {
        if (v[j] > val) {
          count++;
        }
      }
      cout << count << ' ';
      mp[val] = count;
    }
  }
}
