#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int n;
  cin >> n;
  vector<pair<int, int>> Students;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    pair<int, int> A(a, i);
    Students.push_back(A);
  }
  sort(Students.begin(), Students.end());
  vector<int> Places(n);
  int i = 0;
  int q = 1;
  int prev = -1;
  for (auto it = Students.end() - 1; it != Students.begin() - 1; it--) {
    if (prev == it->first) {
      Places[it->second] = i - 1 * q;
      q++;
      i++;
    } else {
      q = 1;
      Places[it->second] = i;
      i++;
    }
    prev = it->first;
  }
  for (int i = 0; i < n; i++) {
    cout << Places[i] + 1 << " ";
  }
}
