August is a windy month, and it also is the month for kiting. Since 1975, Villa de Leyva—a little cold but beautiful town in Colombia—hosts the “Wind and Kites Festival”. Thus, during three days, Villa de Leyva’s sky turns into a patchwork quilt full of kites in different colors and shapes. Some old-school kite makers still prefer the crafting of the traditional diamond-shape kite. And since some of the RPC’s members are kite-enthusiasts, they decided to take part on the “Wind and Kites Festival — 2014” in order to promote “the largest diamond-shaped kite contest”. Because of this, to promote “the largest diamond shaped kite contest”, the RPC members are going to pay for the paper covering the kites. Also they are setting two new rules: • Every kite shall be crafted in one single color, different from white. • Just one piece of paper must be used for crafting a kite. Here the problem is, considering the RPC’s low budget, the pieces of paper they can afford are part white and part colored, and as any group of computer scientists would do, they want to calculate the size of the largest diamond shaped kite beforehand—with your help, of course. For this task, each piece of paper is represented by a grid of characters, where the size of the paper is proportional to the number of rows and columns on the grid, and the colors are represented by different characters. The white parts are represented by the dot (.) character, and the colored parts are represented by the hash (#) character. But how will you find the longest diamond-shaped kite in a piece bi-colored paper? Well, a picture is worth a thousand words: Here is a diamond-shaped kite with size 1: ... .#. ... Here is a diamond-shaped kite with size 3: .#. ### .#. Here is one with size 5: ....... ...#... ..###.. .#####. ..###.. ...#... ....... To be more precise, there is a diamond-shaped kite of size S centered at position (r, c) of the grid if and only if S is an odd integer, and all cells (i, j) have a #, for every (i, j) such that |r − i| + |c − j| ≤ (S −1)÷2.

2/2 Input Input starts with an integer T, the number of test cases. Each test case starts with two integers, R, C, indicating the number of rows and columns of the grid in a line of its own. This is followed by R lines, each one with C characters, describing the grid. All the characters in the grid will be either a dot (.) or a hash symbol (#). T ≤ 10; 1 ≤ R, C ≤ 500 Output For each test case, print the size of the largest diamond in a single line. Sample Input 2 33 .#.

.#. 8 10 ..##...#.. .###..###. ..#....... ....##.... ....###### ...#####.. ..######## .....#.... Sample Output 3 5