#include <bits/stdc++.h>
using namespace std;
int a[2001], b[2001], c[2001];
bool u[2001];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(a + 1, a + n + 1);
  reverse(a + 1, a + n + 1);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (b[i] == a[j]) {
        c[i] = j;
        break;
      }
    }
  }
  for (int i = 1; i <= n; ++i) cout << c[i] << " ";
  return 0;
}
