#include <bits/stdc++.h>
using namespace std;
vector<double> ini;
vector<int> pb;
vector<int> name;
vector<int> life;
vector<char> who;
vector<char> love;
set<int> kshe;
set<int> namenai;
map<char, char> mp;
vector<pair<int, int> > mk;
long long lalaland[100009], lala[100009];
int main() {
  int n;
  cin >> n;
  int s[n], sa[n], j = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    sa[j++] = s[i];
  }
  sort(sa, sa + j, greater<int>());
  for (int i = 0; i < n; i++) {
    for (int k = 0; k < j; k++) {
      if (s[i] == sa[k]) {
        name.push_back(k + 1);
        break;
      }
    }
  }
  for (int i = 0; i < name.size(); i++) cout << name[i] << " ";
  return 0;
}
