Killjee being very afraid of bugs is trying to eliminate all the bugs from his world. In Killjee's world bugs are substrings of Killjee's special strings.
Killjee has N special strings and Q buggy strings. He wants you to find how many times every bug is found in KIlljee's special strings.
Note that a bug can occur more than once in a single special string.
INPUT CONSTRAINTS
INPUT FORMAT
First line of input contains a single integer N, number of special strings. N line follows each containing a special string. Next line contains a single string Q, Q lines follow each containing a bug.
OUTPUT FORMAT
Print Q lines each containing number of times bug occurs in Killjee's world.
For 1st query "a" occur twice in 1st special string and once in 2nd special string,
For 2nd query "ab" occur once in both the special strings.