#include <bits/stdc++.h>
using namespace std;
const long long MX = 2e5 + 5;
const long long INF = 1e18;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long a[n], b[n];
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(a, a + n);
  for (long long i = 0; i < n; i++) {
    if (a[i] == a[i + 1]) {
      continue;
    } else {
      m[a[i]] = n - i;
    }
  }
  for (long long i = 0; i < n; i++) {
    cout << m[b[i]] << " ";
  }
  cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << "s\n";
  return 0;
}
