SP13918 STRINGQ - String Queries
Description
Consider a string S, consisting of lowercase alphabets.
Input Format
First line contains T, the number of test cases.
For each test case, first line contains S, the input string.
Next line contains N, the number of queries. Each of the next N lines contains a string of the form "X a b" where X is one of {"Q","U"} and a and b are positive integers such that 1
Output Format
For each test case, print X+1 lines, where X is the number of queries of type Q.
For each query of type Q, print one number which is the answer to the query.
(X+1)th line for each test case, should contain the updated string S.