#include <iostream>
#include <algorithm>
#include <map>
using namespace std;
int main() {
int n, i, *arr1, *arr2;
map<int, int> match;
while(cin>>n) {
arr1 = (int*)malloc(sizeof(int)*n);
arr2 = (int*)malloc(sizeof(int)*n);
// 输入数组数据
for(i=0; i<n; i++) {
int mid;
cin>>mid;
arr1[i] = mid;
arr2[i] = mid;
}
// 对arr2中的数组内容进行排序
sort(arr2, arr2+n);
int index = 0;
for(i=0; i<n; i++) {
match.insert(pair<int, int>(arr2[i], index)); // match保存排序之后数值与序号的键值对
index++;
if(i!=0 && arr2[i] == arr2[i-1]) { // 重复数值不增加index
index--;
}
}
for(i=0; i<n; i++) {
if(i != n-1) {
cout<<match.find(arr1[i])->second+1<<" ";
}
else {
cout<<match.find(arr1[i])->second+1<<endl;
}
}
}
return 0;
}