Substring Query

아직 제출이 없습니다시간 제한10초메모리 제한512 MB

문제

Bobo has nn strings S_1,S_2,,S_nS\_1, S\_2, \dots, S\_n. One day, his friend yiyi comes and asks him qq questions: how many strings in S_l_i,S_l_i+1,,S_r_iS\_{l\_i}, S\_{l\_i + 1}, \dots, S\_{r\_i} containing P_iP\_i as a substring?

Help bobo find out the answer.

입력

The first line contains 22 integers n,qn, q (1n,q2000001 \leq n, q \leq 200000).

Each of the following nn lines contains 11 string S_iS\_i (S_1+S_2++S_n200000|S\_1| + |S\_2| + \dots + |S\_n| \leq 200000).

Each of the last qq lines contains 22 integers l_i,r_il\_i, r\_i and 11 string P_iP\_i.

(1l_ir_in,P_1+P_2++P_n2000001 \leq l\_i \leq r\_i \leq n, |P\_1| + |P\_2| + \dots + |P\_n| \leq 200000)

All strings consist of "a" and "b".

출력

For each question, a single integer denotes the answer.