SP10519 KOPC12G - K12-Bored of Suffixes and Prefixes
Description
You are given an alphabetical matrix of size NxN .You have to perform two kinds of operations 1) Update and 2) query.The matrix contains only Uppercase English alphabets.
Input Format
The first line of the input file contains T which denotes the number of test cases.
The first line of each test case contains two integers N and q where N denotes size of the matrix and q denotes the number of queries. This is followed by NxN alphabetic matrix. The matrix is followed by q lines of queries, in the above given format.
T
Output Format
Print the output for each query line by line.