#include <bits/stdc++.h>
using namespace std;
inline long long MIN(long long a, long long b) { return a > b ? b : a; }
inline long long MAX(long long a, long long b) { return a > b ? a : b; }
int n, i, j, k, ans[2005] = {0};
vector<pair<int, int> > arr;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> j;
    arr.push_back(pair<int, int>(j, i));
  }
  sort(arr.rbegin(), arr.rend());
  j = 1;
  ans[arr[0].second] = 1;
  for (i = 1, k = 1; i < n; ++i, ++k) {
    if (arr[i].first < arr[i - 1].first) {
      ans[arr[i].second] = 1 + i;
    } else
      ans[arr[i].second] = ans[arr[i - 1].second];
  }
  for (i = 0; i < n; ++i) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
