输入描述:
The first line of input is the number of test cases T.
For each test case.
The first line contains three integers N(4<=N<=100),M(4<=M<=100)and t(0<=t<=1000).
N and M means that the rows and columns, t represent time,
'G' is gogo performances location, 'S' is for SJ to see the performance of the location and 'X' is the wall, '.' is Blank.
输出描述:
For each test case,
if SJ can find a safe place after t seconds,
then output now the situation room,
'G' is 'chemical and biological weapons',
‘S’ is indicates a place of safety.
Otherwise, output "No".