NAJKTS - Khoj The Search

no tags 

Have you heard the name of Ananta Jalil? Yes you have. He is a familiar figure of our film industry. He is very famous for his action romantic type movies. His recent release film is Khoj the Search. Ananta Jalil is in a terrible mission on this movie to find some integer. Ananta Jalil Have N integer number maybe some numbers are repeated. He have Q Mission is finding integer number and its frequency. But he can’t do the boring job. Now need your help. Please Help Jolil.

Input

Input start with an integer T (T ≤ 10).

Each test case contain a integer N Q (1 ≤ N, Q ≤ 10000).

Next line contains N space-separated integer numbers (0 ≤ ai ≤ 10000).

Next lines contains Q space-separated integer number. (0 ≤ qi ≤ 10000).

Output

For each test case, print in a single line Q integers, where the ith integer represents the answer to the ith query. (Note If a number is not found in array just print No and other otherwise print the frequency number ith integer)

Example

Input:
2
10 5
1 2 3 1 3 1 2 4 3 1
1 2 3 4 5
10 5
3 2 2 2 2 3 4 4 5 2
1 2 3 4 5

Output:
Case 1: 4 2 3 1 No
Case 2: No 5 2 2 1

hide comments
nadstratosfer: 2018-08-23 18:46:12

There are no blanklines in input despite the sample implying so.

psyclaudeZ: 2014-10-26 04:39:37

So quick... But I agree.

Jacob Plachta: 2014-10-26 04:31:54

Moved to Tutorial.


Added by:Najmuzzaman
Date:2014-10-25
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64