import java.util.Scanner;
class Main {
public int[] solution(int n, int[] arr) {
int[] answer = new int[n];
int cnt = 1;
for(int i = 0; i < n; i++) {
for(int j = 0; j < n; j++){
if(arr[j] > arr[i]) cnt++;
}
answer[i] = cnt;
cnt = 1;
}
return answer;
}
public static void main(String[] args) {
Main T = new Main();
Scanner kb = new Scanner(System.in);
int n = kb.nextInt();
int[] arr = new int[n];
for(int i = 0; i < arr.length; i++){
arr[i] = kb.nextInt();
}
for(int x : T.solution(n, arr)){
System.out.print(x + " ");
};
}
}