#include <bits/stdc++.h>
using namespace std;
int a[2005], b[2005], ans[2005];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(b, b + n);
  b[n] = -1;
  for (int i = 0; i < n; i++) {
    int *x = upper_bound(b, b + n, b[i]);
    if (*x != -1) {
      ans[b[i]] = (b + n - x) + 1;
    } else {
      ans[b[i]] = 1;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[a[i]] << " ";
  }
}
