You are given Q queries of two types to process:
Your are required to follow each of these query and print the answer. The given strings shall consist of lowercase English Letters, and their length shall not exceed 10.
Input:
First line: Q.
Next Q lines contains the desired queries.
Output:
Follow all the queries in the proper order and output the answer if asked in a new line.
Constraints:
1 <= Q <= 105
1 <= length(Value) <= 10
In the first 3 queries string are respectively added on the paper and in the last queries you have the find the first and last occurrence of string "pranjuldb" and it occurred for the first time at query 1st and its last occurrence was query 3rd.