#include <bits/stdc++.h>
long long power(long long base, long long exp) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base);
    base = (base * base);
    exp /= 2;
  }
  return res;
}
long long mod(long long a, long long b) { return (a % b + b) % b; }
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, x;
  cin >> n;
  vector<long long> v;
  long long arr[2005];
  memset(arr, 0, sizeof(arr));
  long long arr1[2005];
  memset(arr1, 0, sizeof(arr1));
  for (long long i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
    arr[x]++;
  }
  if (v.size() != 1) {
    for (long long i = 1; i < 2005; i++) {
      x = 0;
      for (long long j = i + 1; j < 2005; j++) {
        x += arr[j];
      }
      arr1[i] = 1 + x;
    }
    for (long long i = 0; i < n; i++) {
      cout << arr1[v[i]] << " ";
    }
  } else {
    cout << 1 << '\n';
  }
  return 0;
}
