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