Gold leaf is a very thin layer of gold with a paper backing. If the paper gets folded and then unfolded, the gold sticks to itself more readily than it sticks to the paper, so patches of gold and patches of bare paper appear. The gold always ends up on one side of the fold, never on both.
In the picture below, the paper was folded along the dashed line.

You are given a crude digital image of a sheet of gold leaf. A pixel whose area is mostly gold is written as #, and a pixel whose area is mostly bare paper is written as .. Find where the sheet was folded.
The sheet was folded exactly once, along a horizontal line, a vertical line, or a 45 degree diagonal line. A horizontal or vertical fold always runs between two rows or between two columns. A diagonal fold runs through a diagonal line of cells, and every cell on the fold is #. Of two cells that meet each other when the paper is folded, exactly one is #, and a cell that meets no other cell keeps its gold and is #.
The first line contains the number of test cases T (1≤T≤100).
Each test case starts with a line containing two integers N and M (2≤N,M≤25), where N is the number of rows and M is the number of columns of the photograph. Each of the next N lines contains exactly M characters, each of which is # or .. At least one . appears, and a fold that explains the image always exists.
For each test case, print four integers r1 c1 r2 c2 on one line, giving the two places where the fold hits the edges of the paper. Here r is a row and c is a column, the top left character is (1,1), and the bottom right character is (N,M).
For a horizontal or diagonal fold, print the left coordinates before the right ones. For a vertical fold, print the top coordinates before the bottom ones. For a horizontal fold, use the coordinates above the fold. For a vertical fold, use the coordinates to the left of the fold. For a diagonal fold, use the coordinates of the cells that the fold runs through. If more than one fold is possible, choose the one with the smallest first coordinate, then the smallest second coordinate, then the third, then the fourth.