The robot is located on a checkered rectangular board of size n × m (n rows, m columns). The rows in the board are numbered from 1 to n from top to bottom, and the columns — from 1 to m from left to right.

The robot is able to move from the current cell to one of the four cells adjacent by side.

Each cell has one of the symbols 'L', 'R', 'D' or 'U' written on it, indicating the direction in which the robot will move when it gets in that cell — left, right, down or up, respectively.

The robot can start its movement in any cell. He then moves to the adjacent square in the direction indicated on the current square in one move. 

  * If the robot moves beyond the edge of the board, it falls and breaks. 
  * If the robot appears in the cell it already visited before, it breaks (it stops and doesn't move anymore). 



Robot can choose any cell as the starting cell. Its goal is to make the maximum number of steps before it breaks or stops.

Determine from which square the robot should start its movement in order to execute as many commands as possible. A command is considered successfully completed if the robot has moved from the square on which that command was written (it does not matter whether to another square or beyond the edge of the board).

Input

The first line contains an integer t (1 ≤ t ≤ 10000) — the number of test cases in the test.

Each test case's description is preceded by a blank line. Next is a line that contains integers n and m (1 ≤ n ≤ 2000; 1 ≤ m ≤ 2000) — the height and width of the board. This line followed by n lines, the i-th of which describes the i-th line of the board. Each of them is exactly m letters long and consists of symbols 'L', 'R', 'D' and 'U'.

It is guaranteed that the sum of sizes of all boards in the input does not exceed 4⋅10^6.

Output

For each test case, output three integers r, c and d (1 ≤ r ≤ n; 1 ≤ c ≤ m; d ≥ 0), which denote that the robot should start moving from cell (r, c) to make the maximum number of moves d. If there are several answers, output any of them.

Example

Input


7

1 1
R

1 3
RRL

2 2
DL
RU

2 2
UD
RU

3 2
DL
UL
RU

4 4
RRRD
RUUD
URUD
ULLR

4 4
DDLU
RDDU
UUUU
RDLD


Output


1 1 1
1 1 3
1 1 4
2 1 3
3 1 5
4 3 12
1 1 4
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
const int INF = 0x7fffffff;
const int mod = 1e9 + 7;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
template <typename T>
void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) print(x / 10);
  putchar('0' + x % 10);
}
char s[MAXN][MAXN];
int n, m;
int vis[MAXN][MAXN], ans[MAXN][MAXN];
void dfs(int x, int y) {
  int nx = x, ny = y;
  if (s[x][y] == 'D')
    nx++;
  else if (s[x][y] == 'U')
    nx--;
  else if (s[x][y] == 'L')
    ny--;
  else
    ny++;
  if (nx >= 0 && nx < n && ny >= 0 && ny < m) {
    if ((s[x][y] == 'U' && s[nx][ny] == 'D') ||
        (s[x][y] == 'D' && s[nx][ny] == 'U') ||
        (s[x][y] == 'L' && s[nx][ny] == 'R') ||
        (s[x][y] == 'R' && s[nx][ny] == 'L'))
      ans[x][y] = 2;
    else if (vis[nx][ny]) {
      ans[x][y] = ans[nx][ny] + 1;
    } else {
      vis[nx][ny] = 1;
      dfs(nx, ny);
      ans[x][y] = ans[nx][ny] + 1;
    }
  } else
    ans[x][y] = 1;
  return;
}
signed main() {
  int t = read();
  while (t--) {
    n = read(), m = read();
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) vis[i][j] = 0, ans[i][j] = 0;
    for (int i = 0; i < n; i++) scanf("%s", s[i]);
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (!vis[i][j]) {
          vis[i][j] = 1;
          dfs(i, j);
        }
      }
    }
    int maxs = -1, mx = 0, my = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (ans[i][j] > maxs) {
          maxs = ans[i][j];
          mx = i, my = j;
        }
      }
    }
    printf("%d %d %d\n", mx + 1, my + 1, maxs);
  }
  return 0;
}
