#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int std[2000];
  int std2[2000];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> std[i];
    std2[i] = std[i];
  }
  sort(std2, std2 + n);
  for (int i = 0; i < n; i++) {
    for (int j = n - 1; j >= 0; j--) {
      if (std[i] == std2[j]) {
        std[i] = n - j;
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) cout << std[i] << " ";
}
