While playing checkers with my daughters I decided to work out which move captures the most checkers.
In checkers you may jump an opponent checker that sits diagonally next to your own checker when the next square in the same direction is empty. The jumped checker leaves the board. A checker that reaches the far side of the board is kinged, and a king moves on all four diagonals. Within one move you may keep jumping as long as the conditions hold.
You are given a checkerboard in the middle of a game. You play red at the bottom of the board against black at the top. Find the largest number of black checkers that a single red king jumps in one move, and print the position of the king that reaches that number.
The board has 8 rows and 8 columns, and row and column numbers start at 0. Each square holds one of the following four values.
R: a red checkerK: a red kingB: a black checkerThe jump rules are these.
B and the square two steps away along the same diagonal is an empty square on the board, the king jumps that B and lands two steps away.B disappears at once, so it cannot be jumped again in the same move.R and K cannot be jumped. If the landing square is off the board or is not empty, the king cannot jump in that direction.For example, on the board in the picture below, the king at row 1 and column 3 makes one jump going down and to the right, and two jumps going down and to the left. The largest number of jumps for that king is 2.

Every board has a red king with at least one jump. No two red kings reach the same largest number of jumps.
The first line contains the number of checkerboards T (1≤T≤20).
Each board follows on 8 lines. A line gives 8 squares from left to right using R, K, B, and spaces, and trailing spaces may be missing. When a line is shorter than 8 characters, the missing squares are empty.
A board holds at most 12 black checkers and at most 12 red checkers counting the kings.
For each board, print on one line the row number and the column number of the red king with the largest number of jumps, followed by that largest number of jumps, separated by spaces.