#JZPGYZ. Sevenk Love Oimaster

Sevenk Love Oimaster

Oimaster and Sevenk love each other.

But recently, Sevenk heard that a girl named ChuYuXun was dating with Oimaster.

As a woman's nature, Sevenk felt angry and began to check Oimaster's online talk with ChuYuXun. Oimaster talked with ChuYuXun n times, and each online talk actually is a string. Sevenk asks q questions like this, "how many strings in Oimaster's online talk contain this string as their substrings?"

Input

There are two integers in the first line, the number of strings n and the number of questions q. And n lines follow, each of them is a string describing Oimaster's online talk. And q lines follow, each of them is a question. n <= 10000, q <= 60000 the total length of n strings <= 100000, the total length of q question strings <= 360000

Output

For each question, output the answer in one line.

Example

Input:
3 3
hi,I'mChuYuXun..YouaresohandsomethatIfallinlovewithyou
butIloveSevenk..you'dbettergoaway
55555555555
ChuYuXun
you
55555555

Output: 1 2 1

</p>