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 CPP):

Solution:
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <iomanip>
#include <algorithm>
#include <iterator>
#include <stack>
#include <queue>
#include <unordered_set>
#include <stdio.h>
#include <math.h>
#include <bitset>

using namespace std;
#define pb push_back
#define mp make_pair
#define ifor(a, b) for(int i = a; i < b; ++i)
#define jfor(a, b) for(int j = a; j < b; ++j)
#define kfor(a, b) for(int k = a; k < b; ++k)
#define irof(a, b) for(int i = b - 1; i >= a; --i)
#define jrof(a, b) for(int j = b - 1; j >= a; --j)
#define krof(a, b) for(int k = b - 1; k >= a; --k)
#define all(a) a.begin(), a.end()
#define safe_ind(ind, mass) ((ind) >= 0 ? mass[ind] : 0)

typedef long long ll;
typedef unsigned long long ull;

ll mmod(ll x, ll y) {
	if (x >= 0LL)
		return x % y;
	else
		return (y - (-x) % y) % y;
}

ll ddiv(ll x, ll y) {
	x -= mmod(x, y);
	return x / y;
}

//vector<int> dsu_par;
//vector<int> dsu_rank;
//
//void dsu_init(int n) {
//	dsu_par.clear();
//	dsu_rank.clear();
//	dsu_par.resize(n);
//	ifor(0, n) dsu_par[i] = i;
//	dsu_rank.resize(n, 1);
//}
//
//int dsu_root(int u) {
//	if (dsu_par[u] == u) return u;
//	return dsu_par[u] = dsu_root(dsu_par[u]);
//}
//
//int dsu_size(int u) {
//	u = dsu_root(u);
//	return dsu_rank[u];
//}
//
//void dsu_merge(int u, int v) {
//	u = dsu_root(u);
//	v = dsu_root(v);
//	if (u != v) {
//		if (dsu_rank[v] > dsu_rank[u]) {
//			swap(u, v);
//		}
//		dsu_par[v] = u;
//		dsu_rank[u] += dsu_rank[v];
//	}
//}



//vector<int> ddo;
//vector<pair<int, int>> fl;
//int n;
//
//void ddo_init() {
//	ddo.clear();
//	ddo.resize(4 * n);
//	fl.clear();
//	fl.resize(4 * n, mp(false, 0));
//}
//
//void v_set(int val, int v, int lb, int rb) {
//	ddo[v] = val * (rb - lb + 1);
//	fl[v] = mp(true, val);
//}
//
//void ddo_set(int val, int l, int r, int v = 0, int lb = 0, int rb = n - 1) {
//	if (rb == lb) {
//		ddo[v] = val;
//		fl[v].first = false;
//		return;
//	}
//	if (l <= lb && r >= rb) {
//		v_set(val, v, lb, rb);
//		return;
//	}
//	int mb = (rb + lb) / 2;
//	if (fl[v].first) {
//		v_set(fl[v].second, 2 * v + 1, lb, mb);
//		v_set(fl[v].second, 2 * v + 2, mb + 1, rb);
//		fl[v].first = false;
//	}
//
//	if (l <= mb && r >= lb) {
//		ddo_set(val, l, r, 2 * v + 1, lb, mb);
//	}
//	if (r >= mb + 1 && l <= rb) {
//		ddo_set(val, l, r, 2 * v + 2, mb + 1, rb);
//	}
//	ddo[v] = ddo[2 * v + 1] + ddo[2 * v + 2];
//}
//
//int ddo_get(int l, int r, int v = 0, int lb = 0, int rb = n - 1) {
//	if (l <= lb && r >= rb) {
//		return ddo[v];
//	}
//	int mb = (rb + lb) / 2;
//	if (fl[v].first) {
//		v_set(fl[v].second, 2 * v + 1, lb, mb);
//		v_set(fl[v].second, 2 * v + 2, mb + 1, rb);
//		fl[v].first = false;
//	}
//	int ans = 0;
//	if (l <= mb && r >= lb) {
//		ans += ddo_get(l, r, 2 * v + 1, lb, mb);
//	}
//	if (r >= mb + 1 && l <= rb) {
//		ans += ddo_get(l, r, 2 * v + 2, mb + 1, rb);
//	}
//	return ans;
//}



void solve() {
	int n, m; cin >> n >> m;
	vector<string> gr(n);
	ifor(0, n) {
		cin >> gr[i];
	}
	if (m % 2 == 1) {
		cout << "YES\n";
		ifor(0, m + 1) {
			cout << (i % 2 + 1) << " ";
		}
		cout << "\n";
		return;
	}
	int p[3];
	ifor(0, n) {
		vector<int> symb(26, -1);
		jfor(0, n) {
			if(i!=j)
			symb[gr[j][i] - 'a'] = j;
		}
		jfor(0, n) {
			if (i !=j && symb[gr[i][j] - 'a'] != -1) {
				cout << "YES\n";
				if (j == symb[gr[i][j] - 'a']) {
					p[0] = i + 1;
					p[1] = j + 1;
					ifor(0, m + 1) {
						cout << p[i % 2] << ' ';
					}
					cout << "\n";
					return;
				}
				else {
					int q[3];
					q[1] = 0;
					q[2] = 2;
					q[0] = 1;
					p[0] = symb[gr[i][j] - 'a'] + 1;
					p[1] = i + 1;
					p[2] = j + 1;
					ifor(0, m + 1) {
						cout << p[(q[(m / 2) % 3] + i) % 3] << ' ';
					}
					cout << "\n";
					return;
				}
			}
		}
	}
	cout << "NO\n";

}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	int t; cin >> t;
	kfor(0, t)
		solve();
	//system("pause");
	return 0;
}