eolymp
bolt
Try our new interface for solving problems
Problems

Mutants

Mutants

Time limit 1 second
Memory limit 128 MiB

For a long time in the Institute 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 data

The first line contains the number of animals n (0n10^5) in the Institute. The next line contains n non-decreasing non-negative integers not exceeding 10^9 - their colors. The third line contains the number of requests m (1m100000) for your program. The next line contains m non-negative integers (not exceeding 10^9 + 1).

Output data

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

Examples

Input example #1
10
1 1 3 3 5 7 9 18 18 57
5
57 3 9 1 179
Output example #1
1
2
1
2
0