#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] = INT_MAX;
  int total = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (b[i] < b[i + 1]) {
      ans[b[i]] = total + 1;
    } else {
      ans[b[i]] = ans[b[i + 1]];
    }
    ++total;
  }
  for (int i = 0; i < n; i++) {
    cout << ans[a[i]] << " ";
  }
}
