#include <bits/stdc++.h>
using namespace std;

const int N = 1e6;
long long a[N], b[N];
int cnt[N];

int main()
{
	ios_base::sync_with_stdio(false);
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i)
		cin >> a[i],
		b[i] = a[i];
	sort(b, b + n);
	for (int i = 0; i < n; ++i)
	{
		cnt[i] = upper_bound(b, b + n, a[i]) - b;
		cout << cnt[i] << " ";
	}
	cout << "\n";
}