#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long n;
  cin >> n;
  int arr[n + 1];
  for (long long i = 1; i < n + 1; i++) cin >> arr[i];
  int brr[n + 1];
  memset((brr), 0, sizeof((brr)));
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (arr[j] > arr[i]) brr[i]++;
    }
  }
  for (long long i = 1; i < n + 1; i++) cout << 1 + brr[i] << " ";
  return 0;
}
