Bobo has n strings S_1,S_2,…,S_n. One day, his friend yiyi comes and asks him q questions: how many strings in S_l_i,S_l_i+1,…,S_r_i containing P_i as a substring?
Help bobo find out the answer.
The first line contains 2 integers n,q (1≤n,q≤200000).
Each of the following n lines contains 1 string S_i (∣S_1∣+∣S_2∣+⋯+∣S_n∣≤200000).
Each of the last q lines contains 2 integers l_i,r_i and 1 string P_i.
(1≤l_i≤r_i≤n,∣P_1∣+∣P_2∣+⋯+∣P_n∣≤200000)
All strings consist of "a" and "b".
For each question, a single integer denotes the answer.