#include <bits/stdc++.h>
using namespace std;
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
int main() {
  int a[2005];
  int b[2005];
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    b[i] = i + 1;
  }
  vector<pair<int, int>> vect;
  for (int i = 0; i < n; ++i) {
    vect.push_back(make_pair(a[i], b[i]));
  }
  sort(vect.begin(), vect.end(), sortinrev);
  for (int i = 0; i < n; ++i) {
    a[i] = vect[i].first;
    b[i] = vect[i].second;
  }
  int c[2005];
  c[0] = 1;
  for (int i = 1; i < n; ++i) {
    if (a[i] == a[i - 1])
      c[i] = c[i - 1];
    else
      c[i] = i + 1;
  }
  vector<pair<int, int>> vecto;
  for (int i = 0; i < n; ++i) {
    vecto.push_back(make_pair(b[i], c[i]));
  }
  sort(vecto.begin(), vecto.end());
  for (int i = 0; i < n; ++i) {
    c[i] = vecto[i].second;
  }
  for (int i = 0; i < n; ++i) {
    cout << c[i] << " ";
  }
  return 0;
}
