#include <bits/stdc++.h>
using namespace std;
int arr[3000];
int sorted[3000];
int pos[3000];
int bs(int number, int b, int e) {
  if (b == e) {
    return pos[b];
  }
  int mid = (b + e) / 2;
  if (sorted[mid] == number) return pos[mid];
  if (number < sorted[mid]) return bs(number, mid + 1, e);
  return bs(number, b, mid - 1);
}
bool comp(int a, int b) { return a > b; }
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    sorted[i] = arr[i];
  }
  sort(sorted, sorted + n, comp);
  int aux = 1;
  int aux2 = 1;
  pos[0] = 1;
  for (int i = 1; i < n; i++) {
    if (sorted[i] != sorted[i - 1]) {
      aux += aux2;
      pos[i] = aux;
      aux2 = 1;
    } else {
      aux2++;
      pos[i] = aux;
    }
  }
  int p2 = 0;
  for (int p1 = 0; p1 < n; p1++) {
    cout << bs(arr[p1], 0, n - 1) << " ";
  }
  cout << endl;
}
