#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<pair<int, int> > A;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    A.push_back(make_pair(x, i));
  }
  sort(A.rbegin(), A.rend());
  int ans[n];
  ans[A[0].second] = 1;
  for (int i = 1; i < A.size(); ++i) {
    if (A[i].first == A[i - 1].first)
      ans[A[i].second] = ans[A[i - 1].second];
    else
      ans[A[i].second] = i + 1;
  }
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << " ";
  }
  return 0;
}
