#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005];
map<int, int> m;
int main() {
  int i, n, c, t, p;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(a, a + n);
  for (i = 0; i < n / 2; i++) {
    t = a[i];
    a[i] = a[n - i - 1];
    a[n - i - 1] = t;
  }
  c = 1;
  p = 0;
  for (i = 0; i < n; i++) {
    if (m.find(a[i]) != m.end())
      p++;
    else {
      m[a[i]] = c + p;
      c = c + p + 1;
      p = 0;
    }
  }
  for (i = 0; i < n; i++) cout << m[b[i]] << " ";
  cout << endl;
  return 0;
}
