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.