#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;
}