import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int[] arr = new int[n];
int[] s = new int[n];
for (int i = 0; i < n; i++)
arr[i] = input.nextInt();
s[0] = 1;
int cnt = 1;
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] == arr[j])
cnt++;
s[i] = cnt;
}
cnt = 1;
}
for (int i = 0; i < n; i++)
System.out.print(s[i] + " ");
}
}