There is a rectangular stamp. A cell of the stamp that carries ink is written as '#', and a cell that carries no ink is written as '.'. Here is one example of a stamp.
..#..#..
.######.
..#..#..
The stamp is pressed on a blank paper exactly twice. Neither the paper nor the stamp is rotated, the stamp stays parallel to the sides of the paper, and the stamp never hangs over the edge of the paper. The two positions can be the same or different.
Every paper cell touched by a '#' cell of the stamp receives ink and becomes '#'. A cell touched by a '.' cell of the stamp stays as it is, so a cell that already has ink keeps its '#'. A cell inked twice looks exactly like a cell inked once.
The paper after the two presses is given. Among all stamps that can produce this paper, find the one with the fewest '#' cells and report how many there are.
The picture below is one paper the stamp above can produce.
..#..#..
.######.
.######.
..#..#..
The first line contains the number of test cases T (1≤T≤100). The first line of each test case contains the height L and the width W of the paper (1≤L,W≤300). The next L lines each contain a string of length W. Each string consists of '.' and '#' only, where '#' is an inked cell and '.' is an empty cell.
For each test case, print on one line the fewest '#' cells a stamp that produces the paper can have. Print 0 when the paper has no inked cell.