#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void chkmax(T& x, T y) {
  if (x < y) x = y;
}
template <class T>
inline void chkmin(T& x, T y) {
  if (y < x) x = y;
}
const int MX = 105;
int n;
char s[3][MX];
int prv[3][MX][MX], nxt[3][MX][MX], T;
struct Pos {
  int x, y, t;
  Pos() {}
  Pos(int x, int y, int t) : x(x), y(y), t(t) {}
};
int vis[3][MX][MX];
Pos q[3 * MX * MX];
int hd, tl;
bool test() {
  int i, j, ii, t, d;
  hd = tl = 0;
  for (i = 0; i < 3; i++) {
    if (s[i][0] == 's') break;
  }
  vis[i][0][0] = T;
  q[tl++] = Pos(i, 0, 0);
  while (hd < tl) {
    Pos tp = q[hd++];
    i = tp.x, j = tp.y + 1, t = tp.t + 1;
    if (prv[i][j][t] == T) continue;
    if (j == n - 1) return 1;
    for (d = -1; d <= 1; d++) {
      ii = i + d;
      if (ii < 0 || ii > 2) continue;
      if (prv[ii][j][t] == T || nxt[ii][j][t] == T) continue;
      if (vis[ii][j][t] != T) {
        vis[ii][j][t] = T;
        q[tl++] = Pos(ii, j, t);
      }
    }
  }
  return 0;
}
int main() {
  int tc, i, j, k, t;
  for (scanf("%d", &tc); tc--;) {
    scanf("%d%d", &n, &k);
    for (i = 0; i < 3; i++) scanf("%s", s[i]);
    T++;
    for (i = 0; i < 3; i++) {
      for (j = 0; j < n; j++) {
        if (!isupper(s[i][j])) continue;
        k = j;
        for (t = 1; t <= n; t++) {
          prv[i][k][t] = T;
          if (k >= 1) nxt[i][k - 1][t] = T;
          if (k >= 2) nxt[i][k - 2][t] = T;
          k -= 2;
          if (k < 0) break;
        }
      }
    }
    puts(test() ? "YES" : "NO");
  }
  return 0;
}
