Karabakh Villages#228

Karabakh Villages

1 second
128 megabytes
Very easy (≈850)

There are many villages in Karabakh. Some of these villages have the same names. For example, you may encounter many villages named "Abdurrakhmanli". You are given a list of villages in Karabakh, and then queries are posed. Each query gives a village name, and you must find out how many villages there are in Karabakh with that name.

For simplicity, the names of the villages have been replaced with numbers.

Input

The first line contains two integers (1 ≤ n ≤ 10^5) and (1 ≤ q ≤ 10^4) – the number of villages in Karabakh and the number of queries.

The second line contains integers a_i~(0 \le a_i \le 10^9) — the names of the villages are given as numbers. The next lines each contain one integer – the name of the village being queried.

Output

For each query, output the number of villages with the same name as specified in the list on a new line.

Examples

Example 1

Loading
Loading