#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int b[2010];
  int ranks[2010];
  vector<int> a;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    a.push_back(b[i]);
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < n; i++) {
    if ((i < n - 1) && (a[i] != a[i + 1])) {
      ranks[a[i]] = n - i;
    }
    if (i == n - 1) {
      ranks[a[i]] = 1;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ranks[b[i]] << " ";
  }
}
