Tales of Chamki and Sushila

0

0 votes
Easy-Medium
Problem

You are given N * M grid consisting of N * M cells. Each cell has a number from 1 to 3. Chamki and Sushila starts to play the game. Chamki will start the game. Rules of the game are:
1.In each move, player selects one of the cell and deletes cells equal to number written on selected cell from the remaining grid. For example if a player selects a cell and 3 is written on it then she will remove exactly 3 cells (numbers written on these 3 cells doesn't matter).
2. Player who cannot make a move will loose.

Input:
First line is T representing total number of test case:
For each test case
First line is N , M.
Next N line contains M integer.
Output:
For each test case print a line with the name of winner.
Constraints:
1 <= T <= 103
1 <= N,M <= 15
count of 1 , 2 , 3 <= 100

Sample Input
2
3 3
2 2 1 
2 3 2 
2 1 1 
2 2
2 2
2 2
Sample Output
Chamki
Sushila
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?