#include <bits/stdc++.h>
using namespace std;
void solve() {
  int i, j, n, m;
  cin >> n;
  vector<int> vec(n);
  vector<int> ans;
  int count = 1;
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
  }
  for (int i = 0; i < n; i++) {
    count = 1;
    for (int j = 0; j < n; j++) {
      if (vec[i] < vec[j]) {
        count++;
      }
    }
    ans.push_back(count);
  }
  for (auto x : ans) {
    if (x > 1)
      cout << x << " ";
    else
      cout << 1 << " ";
  }
  cout << "\n";
}
int32_t main() {
  int T = 1;
  while (T--) {
    solve();
  }
}
