import java.io.*;
import java.util.*;
public class Main {
public static void main(String() args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
ArrayList<Integer> xy=new ArrayList<>();
ArrayList<Integer> answer=new ArrayList<>();
HashMap<Integer,Integer> result=new HashMap<>();
int n=Integer.parseInt(br.readLine());
StringTokenizer st=new StringTokenizer(br.readLine());
for(int i=0; i<n; i++){
int a=Integer.parseInt(st.nextToken());
xy.add(a);
answer.add(a);
}
Collections.sort(xy);
int() num=new int(n);
int temp=xy.get(0);
int tempMany=0;
result.put(temp,tempMany);
for(int i=1; i<n; i++){
if(xy.get(i)!
=temp) {
num(i) += tempMany + 1;
tempMany=num(i);
temp=xy.get(i);
result.put(temp,tempMany);
}
}
for(int i=0; i<n; i++){
bw.write(result.get(answer.get(i))+" ");
}
bw.flush();
}
}