#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string str;
  long long int a, b, n, k;
  cin >> n;
  vector<long long int> all(n);
  vector<long long int> answer(n, 0);
  for (int i = 0; i < n; ++i) cin >> all[i];
  int maxi = *max_element(all.begin(), all.end());
  int counter = 0;
  int position = 1;
  while (maxi != 0) {
    for (int i = 0; i < n; ++i)
      if (all[i] == maxi) answer[i] = position, counter++, all[i] = 0;
    maxi = *max_element(all.begin(), all.end());
    position += counter;
    counter = 0;
  }
  for (long long int i = 0; i < answer.size(); ++i) cout << answer[i] << " ";
  cout << endl;
  ;
  return 0;
}
