Initially you have the text with lowercase english letters.
You have to proceed queries: replace all occurrences of letter in the text with some string .
Now you have to find , where - is the letter on i-th position in the text after all replacements. Positions in the are numbered from 1.
The first line of input contains three integers - a length of the text, a number of replacements, a number of queries where the position was asked.
The second line contains - a string of length n which consists of lowercase english letters.
Then follow lines. The i-th of these lines contains and . The is a lowercase english letter. The is nonempty string which consists of lowercase english letters.
Guaranteed that sum of lengths of all is not greater than .
Then follow lines. The i-th of these lines contains .
For each print or "none" (without quotes) if the length of the text is less than .
Text after first replacement is "ababb".
Text after second replacement is "aabaaabaaba".