#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string res = "";
  cin >> n;
  int arr[2004] = {0};
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  int now_rejt = 0;
  int mesto = 1;
  for (int i = 0; i < n; ++i) {
    now_rejt = arr[i];
    mesto = 1;
    for (int j = 0; j < n; ++j) {
      if (now_rejt < arr[j]) {
        ++mesto;
      }
    }
    stringstream ss;
    ss << mesto;
    string strmesto;
    ss >> strmesto;
    res = res + " " + strmesto;
  }
  res.erase(0, 1);
  cout << res << endl;
  return 0;
}
