#include <bits/stdc++.h>
using namespace std;
string from_int(int number) {
  stringstream ss;
  ss << number;
  return ss.str();
}
int main() {
  string s;
  string tyu;
  getline(cin, tyu);
  getline(cin, s);
  vector<int> num;
  vector<int> deh;
  vector<int> res;
  int count = 0;
  int place = 1;
  s.push_back(' ');
  string t;
  for (int i = 0; i <= s.length() - 1; i++) {
    if (s.at(i) != ' ') {
      t.push_back(s.at(i));
    } else {
      num.push_back(atoi(t.c_str()));
      t = "";
    }
  }
  deh = num;
  res = num;
  sort(deh.begin(), deh.end(), greater<int>());
  for (int o = 0; o <= deh.size() - 1; o++) {
    for (int p = 0; p <= deh.size() - 1; p++) {
      if (num[p] == deh[o]) {
        res[p] = place;
        count++;
      }
    }
    place += count;
    o += count - 1;
    count = 0;
  }
  string ress;
  for (int j = 0; j <= num.size() - 1; j++) {
    t = from_int(res[j]);
    ress += t;
    if (j != num.size() - 1) {
      ress += ' ';
    }
    t = "";
  }
  cout << ress << endl;
}
