Given a grid of cells where each cell contains a digit, find the largest square in this grid that contains the same digit in all of its corner cells. Find the number of cells in the square. Note that a single cell is also a square.
First line of input contains T,the number of test cases.
For each case, the size of the string array is given and following it is the input string array.
Print the largest number of cells in the square.
Data will contain between 1 and 50 elements, inclusive.
The given grid is rectangular.
Each element of data will contain between 1 and 50 digits ('0'-'9'), inclusive.
All elements of data will have the same length.
In the first test case,the largest square is the 3x3 square that contains the digit '3' in each of its corner cells.
Problem Setter: Anjali Singh