As we know, CJC and LOY are the god and goddess in our ACM Team.
One day, they get a long text which is consisted of lowercase alphabets from the outer space. Goddess LOY wonders is our teammates’ names appear in this text and how many times they appeared, so she asks God CJC to find them. Unfortunately, the text is too long, God CJC can hardly find them by eyes, but he cannot lose faces in front of his goddess, either.
To keep the faces of God CJC, please help him.
The first line is the number test cases T (1 <= T <= 20).
The first line of each test case is a long text which is no more than 2000000 lowercase characters.
The second line of each test case is a number n (1 <= n <= 100).
The third line of each test case is n different strings, indicates the names of our teammates, all of them are consisted of lowercase characters and no more than 100 characters. There is a space between each strings.
Output “Case i:#” for each test case (“i” is the order of current test case).
Output appeared times of each teammates’ name (with input order). There is a blank line after each test case. See the sample for more details.