#include <bits/stdc++.h>
using namespace std;
char s[3][111];
bool bo[3][111];
int n, k;
bool check(int x, int y) {
  for (int j = y; j < n; ++j) {
    if (s[x][j] == '.') continue;
    if (y + 2 * y == j || y + 2 * (y - 1) == j || (y + 1 + 2 * y) == j)
      return false;
  }
  return true;
}
int main() {
  int tt;
  scanf("%d", &tt);
  while (tt--) {
    scanf("%d%d", &n, &k);
    scanf(" %s %s %s", s[0], s[1], s[2]);
    memset(bo, false, sizeof(bo));
    for (int i = 0; i < 3; ++i)
      if (s[i][0] == 's' && s[i][1] == '.') bo[i][0] = true;
    for (int i = 0; i < n; ++i) {
      bool p[3];
      p[0] = check(0, i + 1);
      p[1] = check(1, i + 1);
      p[2] = check(2, i + 1);
      if (p[0]) {
        if (bo[0][i] || bo[1][i]) bo[0][i + 1] = true;
      }
      if (p[1]) {
        if (bo[0][i] || bo[1][i] || bo[2][i]) bo[1][i + 1] = true;
      }
      if (p[2]) {
        if (bo[1][i] || bo[2][i]) bo[2][i + 1] = true;
      }
    }
    if (bo[0][n - 1] || bo[1][n - 1] || bo[2][n - 1])
      puts("YES");
    else
      puts("NO");
  }
}
