#include <bits/stdc++.h>
using namespace std;
int n, ar[2002], suma;
map<int, int> mapa;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    mapa[ar[i]]++;
  }
  for (auto& it : mapa) it.second = suma += it.second;
  for (int i = 0; i < n; i++) cout << n - mapa[ar[i]] + 1 << " ";
  cout << '\n';
  return 0;
}
