#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int a[2010];
    for (int i = 1; i <= n; ++i) cin >> a[i];
    for (int i = 1; i <= n; ++i) {
      int u = 1;
      for (int j = 1; j <= n; ++j)
        if (a[i] < a[j]) u++;
      cout << u;
      if (i <= n - 1) cout << " ";
    }
    cout << endl;
  }
}
