#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, res[2005], ans[2005], x;
  vector<pair<int, int>> a;
  cin >> n;
  for (int i = (0); i < (int)(n); i++) {
    cin >> x;
    a.push_back(make_pair(x, i));
  }
  sort(a.begin(), a.end(), greater<pair<int, int>>());
  res[0] = 1;
  int c = 1;
  for (int i = (1); i < (int)(n); i++) {
    if (a[i].first == a[i - 1].first) {
      res[i] = res[i - 1];
      c++;
    } else {
      res[i] = res[i - 1] + c;
      c = 1;
    }
  }
  for (int i = (0); i < (int)(n); i++) {
    ans[a[i].second] = res[i];
  }
  for (int i = (0); i < (int)(n); i++) {
    cout << ans[i] << " ";
  }
  cout << '\n';
  return 0;
}
