#include <bits/stdc++.h>
using namespace std;
int t, n, k, l, r, s;
char c[10][1005];
int m[10][1005];
struct node {
  int x, y;
} q[100005];
int main() {
  scanf("%d", &t);
  while (t--) {
    for (int i = 0; i <= 2; i++)
      for (int j = 0; j <= 500; j++) c[i][j] = '.';
    memset(m, 0, sizeof(m));
    scanf("%d%d", &n, &k);
    scanf("%s", &c[0]);
    c[0][n] = '.';
    scanf("%s", &c[1]);
    c[1][n] = '.';
    scanf("%s", &c[2]);
    c[2][n] = '.';
    if (c[0][0] == 's')
      s = 0;
    else if (c[1][0] == 's')
      s = 1;
    else if (c[2][0] == 's')
      s = 2;
    l = r = 0;
    q[r].x = s;
    q[r].y = 0;
    r++;
    int mark = 0;
    while (l != r) {
      int x = q[l].x;
      int y = q[l].y;
      l++;
      l = l % 90000;
      if (c[x][y + 1] == '.') {
        if (c[x][y + 2] == '.' && c[x][y + 3] == '.' && m[x][y + 3] != 1) {
          q[r].x = x;
          q[r].y = y + 3;
          m[x][y + 3] = 1;
          r++;
        }
        if (x - 1 >= 0 && c[x - 1][y + 1] == '.' && c[x - 1][y + 2] == '.' &&
            c[x - 1][y + 3] == '.' && m[x - 1][y + 3] != 1) {
          q[r].x = x - 1;
          q[r].y = y + 3;
          m[x - 1][y + 3] = 1;
          r++;
        }
        if (x + 1 <= 2 && c[x + 1][y + 1] == '.' && c[x + 1][y + 2] == '.' &&
            c[x + 1][y + 3] == '.' && m[x + 1][y + 3] != 1) {
          q[r].x = x + 1;
          q[r].y = y + 3;
          m[x + 1][y + 3] = 1;
          r++;
        }
      }
      if (y + 1 >= n) {
        mark = 1;
        break;
      }
      r = r % 90000;
    }
    if (mark == 1)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
