Problem: Your friend Salem is Warawreh's brother and only loves math and geometry problems. He has solved plenty of such problems, but according to Warawreh, in order to graduate from university he has to solve more graph problems. Since Salem is not good with graphs he asked your help with the following problem.

<image>

You are given a complete directed graph with n vertices without self-loops. In other words, you have n vertices and each pair of vertices u and v (u ≠ v) has both directed edges (u, v) and (v, u).

Every directed edge of the graph is labeled with a single character: either 'a' or 'b' (edges (u, v) and (v, u) may have different labels).

You are also given an integer m > 0. You should find a path of length m such that the string obtained by writing out edges' labels when going along the path is a palindrome. The length of the path is the number of edges in it.

You can visit the same vertex and the same directed edge any number of times.

Input

The first line contains a single integer t (1 ≤ t ≤ 500) — the number of test cases.

The first line of each test case contains two integers n and m (2 ≤ n ≤ 1000; 1 ≤ m ≤ 10^{5}) — the number of vertices in the graph and desirable length of the palindrome.

Each of the next n lines contains n characters. The j-th character of the i-th line describes the character on the edge that is going from node i to node j.

Every character is either 'a' or 'b' if i ≠ j, or '*' if i = j, since the graph doesn't contain self-loops.

It's guaranteed that the sum of n over test cases doesn't exceed 1000 and the sum of m doesn't exceed 10^5.

Output

For each test case, if it is possible to find such path, print "YES" and the path itself as a sequence of m + 1 integers: indices of vertices in the path in the appropriate order. If there are several valid paths, print any of them.

Otherwise, (if there is no answer) print "NO".

Example

Input


5
3 1
*ba
b*b
ab*
3 3
*ba
b*b
ab*
3 4
*ba
b*b
ab*
4 6
*aaa
b*ba
ab*a
bba*
2 6
*a
b*


Output


YES
1 2
YES
2 1 3 2
YES
1 3 1 3 1
YES
1 2 1 3 4 1 4
NO

Note

The graph from the first three test cases is shown below:

<image>

In the first test case, the answer sequence is [1,2] which means that the path is:

$$$1 \xrightarrow{b} 2$$$

So the string that is obtained by the given path is b.

In the second test case, the answer sequence is [2,1,3,2] which means that the path is:

$$$2 \xrightarrow{b} 1 \xrightarrow{a} 3 \xrightarrow{b} 2$$$

So the string that is obtained by the given path is bab.

In the third test case, the answer sequence is [1,3,1,3,1] which means that the path is:

$$$1 \xrightarrow{a} 3 \xrightarrow{a} 1 \xrightarrow{a} 3 \xrightarrow{a} 1$$$

So the string that is obtained by the given path is aaaa.

The string obtained in the fourth test case is abaaba.

Solution (in JAVA):

Solution:
//stan hu tao
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import java.util.*;
import java.io.*;
import java.math.*;

public class x1481D
{
    public static void main(String hi[]) throws Exception
    {
        int[] map = new int[420];
        map['a'] = 0; map['b'] = 1;
        FastScanner infile = new FastScanner();
        int T = infile.nextInt();
        StringBuilder sb = new StringBuilder();
        matcha:while(T-->0)
        {
            int N = infile.nextInt();
            int K = infile.nextInt();
            char[][] grid = new char[N][N];
            for(int r=0; r < N; r++)
                grid[r] = infile.nextLine().toCharArray();
            if(K%2 == 1)
            {
                sb.append("YES\n");
                sb.append("1 ");
                for(int i=0; i < K; i++)
                {
                    if((i%2) == 0)
                        sb.append("2 ");
                    else
                        sb.append("1 ");
                }
                sb.append("\n");
            }
            else if(K > 1)
            {
                for(int a=0; a < N; a++)
                    for(int b=a+1; b < N; b++)
                        if(grid[a][b] == grid[b][a])
                        {
                            sb.append("YES\n");
                            int curr = a+1;
                            sb.append(curr+" ");
                            for(int i=0; i < K; i++)
                            {
                                if(curr == a+1)
                                    curr = b+1;
                                else
                                    curr = a+1;
                                sb.append(curr+" ");
                            }
                            sb.append("\n");
                            continue matcha;
                        }
                if(N == 2)
                    sb.append("NO\n");
                else
                {
                    sb.append("YeS\n");
                    //1 2 3
                    int x = map[grid[0][1]];
                    int y = map[grid[1][2]];
                    int z = map[grid[2][0]];
                    if(x+y+z == 0 || x+y+z == 3)
                    {
                        sb.append("1 ");
                        int curr = 2;
                        for(int i=0; i < K; i++)
                        {
                            sb.append(curr+" ");
                            curr++;
                            if(curr == 4)
                                curr = 1;
                        }
                        sb.append("\n");
                        continue matcha;
                    }
                    else if(x+y+z == 1)
                    {
                        x ^= 1;
                        y ^= 1;
                        z ^= 1;
                    }
                    int[] arr = new int[3];
                    arr[0] = x; arr[1] = y; arr[2] = z;
                    int[] tags = new int[3];
                    tags[0] = 1; tags[1] = 2; tags[2] = 3;
                    if(K%3 == 0)
                    {
                        //bab
                        while(arr[0] != 1 || arr[2] != 1)
                        {
                            arr = cyc(arr);
                            tags = cyc(tags);
                        }
                    }
                    else if(K%3 == 1)
                    {
                        //abb
                        while(arr[1] != 1 || arr[2] != 1)
                        {
                            arr = cyc(arr);
                            tags = cyc(tags);
                        }
                    }
                    else
                    {
                        //bba
                        while(arr[0] != 1 || arr[1] != 1)
                        {
                            if(debug){
                                print(arr);
                                print(tags);
                            }
                            arr = cyc(arr);
                            tags = cyc(tags);
                            if(debug){
                                print(arr);
                                print(tags);
                            }
                        }
                    }
                    //print
                    int curr = tags[0];
                    sb.append(curr+" ");
                    for(int i=0; i < K; i++)
                    {
                        curr++;
                        if(curr >= 4)
                            curr = 1;
                        sb.append(curr+" ");
                    }
                    sb.append("\n");
                }
            }
            else
            {
                sb.append("yES\n");
                sb.append("1 2\n");
            }
        }
        System.out.print(sb);
    }
    public static int[] cyc(int[] arr)
    {
        int[] brr = new int[3];
        for(int i=0; i < 3; i++)
            brr[i] = arr[(i+1)%3];
        return brr;
    }
    static boolean debug = false;
    public static void print(int[] arr)
    {
        //for debugging only
        for(int x: arr)
            System.out.print(x+" ");
        System.out.println();
    }
}
/*
1
3 8
*ba
a*a
bb*

 */
class FastScanner
{
    private int BS = 1 << 16;
    private char NC = (char) 0;
    private byte[] buf = new byte[BS];
    private int bId = 0, size = 0;
    private char c = NC;
    private double cnt = 1;
    private BufferedInputStream in;

    public FastScanner() {
        in = new BufferedInputStream(System.in, BS);
    }

    public FastScanner(String s) {
        try {
            in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
        } catch (Exception e) {
            in = new BufferedInputStream(System.in, BS);
        }
    }

    private char getChar() {
        while (bId == size) {
            try {
                size = in.read(buf);
            } catch (Exception e) {
                return NC;
            }
            if (size == -1) return NC;
            bId = 0;
        }
        return (char) buf[bId++];
    }

    public int nextInt() {
        return (int) nextLong();
    }

    public int[] nextInts(int N) {
        int[] res = new int[N];
        for (int i = 0; i < N; i++) {
            res[i] = (int) nextLong();
        }
        return res;
    }

    public long[] nextLongs(int N) {
        long[] res = new long[N];
        for (int i = 0; i < N; i++) {
            res[i] = nextLong();
        }
        return res;
    }

    public long nextLong() {
        cnt = 1;
        boolean neg = false;
        if (c == NC) c = getChar();
        for (; (c < '0' || c > '9'); c = getChar()) {
            if (c == '-') neg = true;
        }
        long res = 0;
        for (; c >= '0' && c <= '9'; c = getChar()) {
            res = (res << 3) + (res << 1) + c - '0';
            cnt *= 10;
        }
        return neg ? -res : res;
    }

    public double nextDouble() {
        double cur = nextLong();
        return c != '.' ? cur : cur + nextLong() / cnt;
    }

    public double[] nextDoubles(int N) {
        double[] res = new double[N];
        for (int i = 0; i < N; i++) {
            res[i] = nextDouble();
        }
        return res;
    }

    public String next() {
        StringBuilder res = new StringBuilder();
        while (c <= 32) c = getChar();
        while (c > 32) {
            res.append(c);
            c = getChar();
        }
        return res.toString();
    }

    public String nextLine() {
        StringBuilder res = new StringBuilder();
        while (c <= 32) c = getChar();
        while (c != '\n') {
            res.append(c);
            c = getChar();
        }
        return res.toString();
    }

    public boolean hasNext() {
        if (c > 32) return true;
        while (true) {
            c = getChar();
            if (c == NC) return false;
            else if (c > 32) return true;
        }
    }
}