#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long HASH = 1e16 + 7;
long long tavan(long long a, long long b) {
  return b ? (tavan(a * a, b >> 1) * (b & 1 ? a : 1)) : 1;
}
long long gcd(long long a, long long b) {
  return (a < b) ? gcd(b, a) : ((a % b == 0) ? b : gcd(b, a % b));
}
bool isprime(long long x) {
  for (long long i = 2; i <= sqrt(x); i++)
    if (!(x % i)) return false;
  return true;
}
ifstream fin("input.txt");
ofstream fout("output.txt");
int n, a, res[(2200)];
pair<int, int> p[(2200)];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    p[i].first = a;
    p[i].second = i;
  }
  sort(p, p + n);
  res[p[n - 1].second] = 1;
  for (int i = n - 2; i >= 0; i--) {
    if (p[i].first == p[i + 1].first)
      res[p[i].second] = res[p[i + 1].second];
    else
      res[p[i].second] = n - i;
  }
  for (int i = 0; i < n; i++) cout << res[i] << " ";
  return 0;
}
