#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<int, int> > vec;
  int size;
  cin >> size;
  int a[10000];
  for (int i = 0; i < size; i++) {
    cin >> a[i];
    vec.push_back(make_pair(a[i], i));
  }
  sort(vec.begin(), vec.end());
  reverse(vec.begin(), vec.end());
  int index = 1;
  vec[0].second = index;
  for (int i = 1; i < size; i++) {
    if (vec[i].first == vec[i - 1].first) {
      vec[i].second = index;
    } else {
      index = i + 1;
      vec[i].second = index;
    }
  }
  for (int i = 0; i < size; i++) {
    for (int j = 0; j < size; j++) {
      if (a[i] == vec[j].first) {
        cout << vec[j].second << " ";
        break;
      }
    }
  }
  cout << endl;
  return 0;
}
