| Whalica Cup (Round 2) |
|---|
| Finished |
Whalica has $$$n$$$ fans who are invited to join Whalica's lottery game.
Whalica stipulates that only non-empty strings consisting only of the characters $$$\mathtt{a, c, h, i, l, w}$$$ can be winning strings. Before the game starts, each fan writes down a valid guess string $$$s_i$$$.
There are $$$q$$$ events in total. For the $$$i$$$-th event, one of the following happens:
Whalica is too lazy and just wants to rest. Can you help her compute how many Whalica coins she needs to pay out for each draw event?
The first line contains two integers $$$n$$$, $$$q$$$ $$$(1 \le n, q \le 10^5)$$$ — the number of fans and the number of events.
Each of the next $$$n$$$ lines contains a fan's initial guess string $$$s_i$$$ $$$(1 \le |s_i| \le 10^5)$$$.
Each of the next $$$q$$$ lines contains an integer $$$op_i \in \{1,2\}$$$ — the event type.
It is guaranteed that the total sum of $$$|s_i|$$$ and the total sum of $$$|T_i|$$$ do not exceed $$$10^5$$$, and that the character set of all strings is a subset of $$$\{\mathtt{a,c,h,i,l,w}\}$$$.
For each draw event, output the total number of Whalica coins Whalica needs to pay out.
3 3awaawhlicaalicawhalica1 awc21 licwlaawwl
5 7
| Name |
|---|


