I. Grid Coloring
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

There is an $$$n$$$ by $$$n$$$ grid of white squares, each containing a bidirectional horizontal or vertical arrow. In one operation, you can choose any square, and based on the arrow in that square, color all squares in the corresponding row or column black. For example, here is one possible sequence of two operations on a grid with $$$n=4$$$:

What is the minimum number of operations needed to color all squares black, and which squares should you choose in the operations?

Input

The first line of the input contains a single integer $$$t$$$ ($$$1\le t\le 250$$$) — the number of test cases.

The first line of each test case contains a single integer $$$n$$$ ($$$1\le n \le 1000$$$) — the number of rows and columns in the grid.

The $$$i$$$-th of the next $$$n$$$ lines contains $$$n$$$ characters each. The $$$j$$$-th of these is $$$\texttt{H}$$$ if the square in position $$$(i, j)$$$ contains a horizontal arrow, and $$$\texttt{V}$$$ if it contains a vertical arrow.

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$1000$$$.

Output

The first line of output for each test case should contain a single integer $$$k$$$ ($$$0 \le k \le n^2$$$) — the number of operations you will perform.

Each of the next $$$k$$$ lines should contain two integers $$$i$$$ and $$$j$$$ ($$$1 \le i, j \le n$$$) — the row and column of the square you will choose for that operation, respectively.

If there are multiple solutions with minimal $$$k$$$, you can print any.

Example
Input
3
4
VHHV
VVHV
HHVH
VVHV
1
H
2
VH
VV
Output
4
2 3
4 3
1 2
3 2
1
1 1
2
1 1
2 2
Note

The first test case corresponds to the picture above. It can be shown that it is impossible to color everything black in less than $$$4$$$ operations.

In the second test case, since there is only one square, doing a single operation and choosing that square is sufficient to color everything black.