12436 - Hulk's Trouble   

Description

For the previous episode, click here.

Years after Thanos eliminated half lives of the universe and destroyed all the stones, Avengers finally gather 6 infinity stone and equip them onto the glove. The one who snaps the finger must be the strongest avenger. Everybody knows, the avenger is ThorHulk!

Hulk's duty is to revive all lives that was eliminated by Thanos. At the moment he snaps, his mind just enters into the deepest layer of the universe. Now, he can see the whole universe.

However, the amount of information is too large to find those eliminated people. Hulk asks you for help. Please help him to find out the information he needs.

hulk-thinking

Hulk Thinking About This Problem

If you click on this picture, something might happen...


There will be an integer sequence with length , which contains all the information that the universe has.

Hulk will give you several integers. He wants to know how many times the number appears in sequence .

For example, the sequence , then there are two 3, two 6, one 2, and one 5.

Input

The first line contains an integer .

The next line contains integers, which is the sequence .

The next line contains an integer , indicates the amount of numbers Hulk will ask you.

Then lines below, each line contains an integer .

 

Output

For each query, output the number of times that appears in sequence .

Sample Input  Download

Sample Output  Download

Tags




Discuss