#include<stdio.h>
#include<string.h>
#include<iostream>
#include<cmath>
#include<string>
#include<algorithm>
#include<queue>
using namespace std;
class Stu{
public:
int score,number,rank;
Stu(){}
Stu(int a,int b){
score=a;number=b;
}
}student[1111];
bool cmp(Stu p,Stu q){
return p.score>q.score;
}
bool cmp2(Stu p,Stu q){
return p.number<q.number;
}
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++){
cin>>student[i].score;
student[i].number=i;
}
stable_sort(student+1,student+1+n,cmp);
for(int i=1;i<=n;i++) student[i].rank=i;
stable_sort(student+1,student+1+n,cmp2);
cout<<student[1].rank ;
for(int i=2;i<=n;i++){
cout<<' '<<student[i].rank;
} cout<<endl;
}