#include <bits/stdc++.h>
using namespace std;
vector<pair<long long int, long long int> > arr(1234567);
bool pairCompare(const std::pair<long long int, long long int>& firstElem,
                 const std::pair<long long int, long long int>& secondElem) {
  return firstElem.second > secondElem.second;
}
int main() {
  int n;
  cin >> n;
  long long int a;
  for (int i = 0; i < n; i++) {
    cin >> a;
    arr[i].first = i;
    arr[i].second = a;
  }
  sort(arr.begin(), arr.begin() + n, pairCompare);
  int ranking = 1;
  int rating = arr[0].second;
  int continious = 1;
  for (int i = 1; i < n; i++) {
    if (rating != arr[i].second) {
      ranking += continious;
      continious = 1;
    } else {
      continious++;
    }
    rating = arr[i].second;
    arr[i].second = ranking;
  }
  arr[0].second = 1;
  sort(arr.begin(), arr.begin() + n);
  for (int i = 0; i < n; i++) cout << arr[i].second << " ";
}
