#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const double eps = 1e-6;
const int MAXN = 1e3 + 5;
const long long MOD = 1e9 + 7;
struct P {
  int r, c;
};
int n;
char maze[5][105];
bool vis[5][105];
bool bfs() {
  int r, c = 1;
  if (maze[1][c] == 's') r = 1;
  if (maze[2][c] == 's') r = 2;
  if (maze[3][c] == 's') r = 3;
  P start = {r, c};
  vis[r][c] = true;
  queue<P> q;
  q.push(start);
  while (!q.empty()) {
    P p = q.front();
    q.pop();
    int nr = p.r, nc = p.c + 1;
    if (maze[nr][nc] != '.') continue;
    if (nc == n) return true;
    if (nc + 1 == n) {
      if (maze[nr][nc + 1] == '.') return true;
      if (maze[nr + 1][nc] == '.' && maze[nr + 1][nc + 1] == '.') return true;
      if (maze[nr - 1][nc] == '.' && maze[nr - 1][nc + 1] == '.') return true;
      return false;
    }
    if (maze[nr][nc + 1] == '.' && maze[nr][nc + 2] == '.') {
      if (nc + 2 == n) return true;
      P mid = {nr, nc + 2};
      if (!vis[nr][nc + 2]) vis[nr][nc + 2] = true, q.push(mid);
    }
    if (maze[nr + 1][nc] == '.' && maze[nr + 1][nc + 1] == '.' &&
        maze[nr + 1][nc + 2] == '.') {
      if (nc + 2 == n) return true;
      P mid = {nr + 1, nc + 2};
      if (!vis[nr + 1][nc + 2]) vis[nr + 1][nc + 2] = true, q.push(mid);
    }
    if (maze[nr - 1][nc] == '.' && maze[nr - 1][nc + 1] == '.' &&
        maze[nr - 1][nc + 2] == '.') {
      if (nc + 2 == n) return true;
      P mid = {nr - 1, nc + 2};
      if (!vis[nr - 1][nc + 2]) vis[nr - 1][nc + 2] = true, q.push(mid);
    }
  }
  return false;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int k;
    scanf("%d%d", &n, &k);
    memset(maze, 0, sizeof(maze));
    memset(vis, false, sizeof(vis));
    for (int i = 1; i <= 3; i++) scanf("%s", maze[i] + 1);
    printf("%s\n", bfs() ? "YES" : "NO");
  }
  return 0;
}
