Nikuniku designs a new programming language with only two kinds of instructions. Initially, we can consider the program as a queue $$$P$$$ containing of $$$n$$$ instructions. The program will need another queue of $$$Q$$$ to run. Initially, you copy all instructions from $$$P$$$ and add them to the back of the queue $$$Q$$$ in order. Afterward, each time $$$Q$$$ will pop the instruction in the front and run it. Now we give the format and usage of the two instructions:
Now you need to simulate the process after running $$$k$$$ instructions from the queue. Specifically, please compute the string outputted by the program.
The first line has two integers, $$$n$$$ and $$$k$$$ ($$$1 \le n, k \le 10^5$$$).
For the following $$$n$$$ lines, each line contains an instruction in the format of $$$s$$$ and $$$t$$$ separated by one space. $$$s$$$ will be either "echo" or "cp". If $$$s$$$ is "echo", $$$t$$$ will be a single lower-case character. Otherwise, $$$t$$$ will be an integer between $$$1$$$ and $$$n$$$.
Output the result string in one line for the first $$$k$$$ instructions. If the program terminates with less than $$$k$$$ instructions run, output the result for all instructions.
2 20 echo a cp 2
aaaaaaaaaa
3 18 echo a cp 2 echo b
abaaaaaaaa
4 40 echo a cp 2 echo b cp 4
abaabaaabaaaabaaaaab
5 50 echo a cp 2 echo b cp 5 cp 5
abaababaaababaababaaaa
| Name |
|---|


