#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
const int inf = 0x3f3f3f3f;
const int ine = -0x3f3f3f3f;
template <typename T>
inline T Max(T x, T y, T z) {
  return max(max(x, y), z);
}
template <typename T>
inline T Min(T x, T y, T z) {
  return min(min(x, y), z);
}
template <typename T>
inline T Abs(T a) {
  return a > 0 ? a : -a;
}
template <typename T>
inline void checkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
inline void checkmin(T &x, T y) {
  x = min(x, y);
}
inline int read() {
  int f = 1, x = 0;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f = -1;
  } while (ch < '0' || ch > '9');
  do {
    x = x * 10 + ch - '0';
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return f * x;
}
const int N = 105;
int Q, n, t, S, T;
bool flg[5][N], ifcan, markdown[5][N];
void dfs(int i, int j) {
  if (j > n) {
    ifcan = true;
    return;
  }
  if (ifcan || markdown[i][j]) return;
  markdown[i][j] = true;
  for (int ci = -1; ci <= 1; ++ci)
    if (i + ci >= 1 && i + ci <= 3 && !flg[i][j + 1] && !flg[i + ci][j + 1] &&
        !flg[i + ci][j + 2] && !flg[i + ci][j + 3])
      dfs(i + ci, j + 3);
}
int main() {
  Q = read();
  while (Q--) {
    n = read();
    t = read();
    memset(flg, false, sizeof flg);
    memset(markdown, false, sizeof markdown);
    for (int i = 1; i <= 3; ++i)
      for (int j = 1; j <= n; ++j) {
        char cr;
        cin >> cr;
        if (cr == 's') S = i, T = j;
        if (cr >= 'A' && cr <= 'Z') flg[i][j] = true;
      }
    ifcan = false;
    dfs(S, T);
    if (ifcan)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
