You have a string that initially is empty and can contain lowercase Latin letters ('', '', ..., ''). You will receive a series of queries, which must be processed in the order they are given. There are three types of queries:
i k a: Here, is an integer ranging from to the current length of the string , and is a lowercase Latin letter. This query instructs you to insert the character into the string immediately after the -th character.
d k: In this query, is an integer from to the current length of the string . You need to delete the -th character from the string .
q t: Here, is a string composed of lowercase Latin letters. This query asks you to check if is a subsequence of (i.e., if can be formed by deleting some (possibly zero) characters from ). If is a subsequence, output ; otherwise, output .
Each line of the input file contains a query in one of the formats described above. The total number of queries will not exceed 10^6, and the total length of the file will not exceed 4 \cdot 10^6.
The output file should list the results of all queries of the third type, in the order they are received. Each result should be printed on a new line.
Example 1