#include <bits/stdc++.h>
int n, m;
char mmap[3][200];
int ans = 0;
int vis[3][200];
void DFS(int x, int y) {
  if (y >= n - 1) {
    ans = 1;
    return;
  }
  vis[x][y] = 1;
  if (mmap[x][y + 1] != '.') return;
  for (int i = -1; i < 2; ++i) {
    if (x + i < 0 || x + i > 3 || mmap[x + i][y + 1] != '.') continue;
    int f = 1;
    for (int j = 1; j <= 3; ++j) {
      if (mmap[x + i][y + j] != '.') {
        f = 0;
        break;
      }
    }
    if (!f) continue;
    if (!vis[x + i][y + 3]) DFS(x + i, y + 3);
  }
  return;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int sx;
    ans = 0;
    memset(vis, 0, sizeof(vis));
    scanf("%d%d", &n, &m);
    for (int i = 0; i < 3; ++i) {
      scanf("%s", mmap[i]);
    }
    for (int i = 0; i < 3; ++i)
      for (int j = n; j <= n + 10; ++j) mmap[i][j] = '.';
    for (int i = 0; i < 3; ++i) {
      if (mmap[i][0] == 's') {
        sx = i;
      }
    }
    DFS(sx, 0);
    if (!ans)
      printf("NO\n");
    else
      printf("YES\n");
  }
  return 0;
}
