#include <stdio.h>
int main()
{
int N,K;
scanf("%d",&N);
int i,j;
int score[N];
int count[101] = {0};
for(i = 0; i < N; i ++)
{
scanf("%d",&score[i]);
count[score[i]] ++;
}
scanf("%d",&K);
int snum[K];
int scount[K];
for(i = 0 ; i < K; i ++)
{
scanf("%d",&snum[i]);
printf("%d",count[snum[i]]);
if(i != K -1)
{
printf(" ");
}
}
return 0;
}
07-25
674
09-26
324
02-22
242