Description

You are given a rectangular map of a continent. The map is a grid of squares, each square has a color. A country is a connected set of squares (squares are connected if they share an edge) that have the same color. Neighboring countries have different colors. Find the size (in squares) of the largest country.

There will be at least one country in the map.

Input

Input data will be provided as standard input to the program. The first line of input contains the number of test cases (<=10). Each test case begins with a line containing two numbers W and H, the width and height of the map, separated by a single space, 1 <= W,H <= 10. The next H lines contain W characters each | they describe the map. Colors are represented by the letters A-Z. Water (no country) is represented by a dot.Output

For each test case output one line containing the size of the largest country.Sample input

16 5

...BBB

.AAAAB

..BBA.

..BB..

......

Sample output

5

Source

FOJ月赛-2007年5月