Mutants#3970

Mutants

1 second
128 megabytes
Easy

For a long time at the Academy of Arts, Mutants and Information Technologies, cute colorful animals are bred. For convenience, each color is designated by its own number, there are no more than 10^9 colors in total. One of the beautiful days a miracle happened in the nursery: all the animals were lined up in a row in ascending order of colors. Taking this opportunity, the laboratory assistants decided to count how many animals of different colors live in the nursery, and, according to the law of the genre, they asked you to write a program that will help them in solving this difficult task.

Input

The first line contains the number of animals (0 \le n \le 10^5) at the Academy. The next line contains non-decreasing non-negative integers not exceeding 10^9 - their colors. The third line contains the number of requests (1 \le m \le 100000) for your program. The next line contains non-negative integers (not exceeding 10^9 + 1).

Output

Print lines. For each query, print the number of animals of the given color in the nursery.

Examples

Example 1

Loading
Loading