#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
using std::sort;
using std::string;
using std::swap;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  {
    int n;
    while (cin >> n) {
      std::pair<int, int> v[n];
      for (int i = 0; i < n; ++i) {
        int a;
        cin >> a;
        v[i] = std::make_pair(a, i);
      }
      std::sort(v, v + n);
      int ans[n], rate = 0, now = 0;
      for (int i = n - 1; i >= 0; --i) {
        if (now != v[i].first) {
          now = v[i].first;
          ans[v[i].second] = rate = n - i;
        } else
          ans[v[i].second] = rate;
      }
      for (int i = 0; i < n; ++i) cout << ans[i] << " ";
      cout << endl;
      ;
    };
  }
  return 0;
};
