#include <bits/stdc++.h>
using namespace std;
int n, k;
char tmp[10010];
int mapn[3][10010];
bool vis[3][10010];
int dx[3] = {0, 1, -1};
int dy[3] = {0, 0, 0};
struct NODE {
  int x, y;
};
void bfs() {
  int i, y;
  queue<NODE> q;
  NODE now, next;
  memset(vis, 0, sizeof(vis));
  for (i = 0; i < 3; i++)
    for (y = 0; y < n; y++) {
      if (mapn[i][y] == 1) {
        now.x = i;
        now.y = y;
      }
    }
  vis[now.x][now.y] = 1;
  q.push(now);
  while (!q.empty()) {
    now = q.front();
    q.pop();
    now.y++;
    if (now.y >= n) continue;
    if (mapn[now.x][now.y] == -1) continue;
    for (i = 0; i < 3; i++) {
      next.x = now.x + dx[i];
      next.y = now.y + dy[i];
      if (next.x >= 0 && next.x < 3 && next.y >= 0 && next.y < n &&
          mapn[next.x][next.y] == -1)
        continue;
      if (next.x < 0 || next.x >= 3) continue;
      next.y += 2;
      if (next.y >= n) next.y = n - 1;
      if (next.x >= 0 && next.x < 3 && next.y >= 0 && next.y < n &&
          mapn[next.x][next.y] == 0 && vis[next.x][next.y] == 0) {
        vis[next.x][next.y] = 1;
        q.push(next);
      }
    }
  }
  for (i = 0; i < 3; i++) {
    for (y = n - 1; y >= 0; y--) {
      if (vis[i][y] == 1) {
        printf("YES\n");
        return;
      }
      if (mapn[i][y] == -1) break;
    }
  }
  printf("NO\n");
  return;
}
int main() {
  int T, i, y;
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d", &n, &k);
    for (i = 0; i < 3; i++) {
      scanf("%s", tmp);
      for (y = 0; y < n; y++) {
        if (tmp[y] == 's')
          mapn[i][y] = 1;
        else if (tmp[y] == '.')
          mapn[i][y] = 0;
        else
          mapn[i][y] = -1;
      }
    }
    bfs();
  }
  return 0;
}
