J. Zmeh The ASZoo Keeper
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Zmeh is a zookeeper at ASZoo. He knows the number of animals in each family, so he wants to challenge you.

Given an array of $$$n$$$ strings $$$s$$$ denoting the kind of each animal in the zoo, and $$$q$$$ queries.

On each query, you'll be given a string $$$t$$$ and you must find the number of animals that are from that family.

Input

The first line of input consists of two integers $$$n$$$, $$$q$$$ ($$$ 1 \le n, q \le 6 \cdot 10^4$$$).

The second line of input consists of $$$n$$$ strings $$$s_1, s_2, ..., s_n$$$ ($$$1 \le |s_i| \le 10$$$).

The next q lines consist of $$$t_i$$$ ($$$1 \le |t_i| \le 10$$$).

Output

For each test case, print the number of animals that are from family $$$t_i$$$.

Example
Input
4 4
dog cat dog dog
dog
cat
dog
lion
Output
3
1
3
0