#include <bits/stdc++.h>
using namespace std;
int main() {
  pair<int, int> a[10001], b[10001];
  int n;
  cin >> n;
  for (int i = 1; i < n + 1; ++i) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a + 1, a + n + 1);
  for (int i = n, t = a[i].first, j = 1; i > 0; --i) {
    if (a[i].first == t)
      a[i].first = j;
    else
      t = a[i].first, j = n - i + 1, a[i].first = j;
  }
  for (int i = 1; i < n + 1; ++i) {
    b[i].first = a[i].second;
    b[i].second = a[i].first;
  }
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= n; ++i) cout << b[i].second << " ";
  return 0;
}
