After losing the nintendo game and the bet with King, Saitama now tries his hand at programming! He is trying to build a text-editor, but alas, he is too dumb to write even a line of code! Let's assume that everything written inside the text-editor is a large string. Initially there is no text in text-editor, i.e the string is empty. He wants to perform three kinds of operations on this string.
: Print the substring of size starting from pos .
: Insert string at position in the string.
: Delete all characters in range in string.
Please help him implement this humongous task.
Input
First line contains , i.e number of queries
Next lines contain queries.
Output
For every query of type , print the substring of given size from given position.
It is guaranteed that all queries are valid. The first position in string is index .
Constraints
Let string be .
Initially is empty.
After the query, ,
After the query,
In query, the substring of size from position is
After query,
In query, the substring of size from position is