#include <bits/stdc++.h>
using namespace std;
const int N = 2000;
bool used[N];
int p[N];
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a.begin(), a.end());
  p[a[a.size() - 1].second] = 1;
  for (int i = a.size() - 2; i > -1; i--) {
    if (a[i].first == a[i + 1].first)
      p[a[i].second] = p[a[i + 1].second];
    else
      p[a[i].second] = a.size() - i;
  }
  for (int i = 0; i < n; i++) cout << p[i] << " ";
  cout << endl;
}
