#include <bits/stdc++.h>
using namespace std;
bool visit[3][200];
bool ans;
int n, k;
char maze[3][200];
void dfs(int x, int y) {
  visit[x][y] = true;
  if (y >= n - 1) {
    ans = true;
    return;
  }
  if (maze[x][y + 1] != '.') return;
  for (int i = -1; i <= 1; i++) {
    if (x + i < 0 || x + i > 3 || maze[x + i][y + 1] != '.') continue;
    bool flag = true;
    for (int j = 1; j <= 3; j++) {
      if (maze[x + i][y + j] != '.') {
        flag = false;
        break;
      }
    }
    if (!flag) continue;
    if (!visit[x + i][y + 3]) dfs(x + i, y + 3);
  }
  return;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int s;
    ans = false;
    memset(visit, false, sizeof(visit));
    scanf("%d%d", &n, &k);
    for (int i = 0; i < 3; i++) {
      scanf("%s", maze[i]);
    }
    for (int i = 0; i < 3; i++) {
      for (int j = n; j <= n + 5; j++) {
        maze[i][j] = '.';
      }
    }
    for (int i = 0; i < 3; i++) {
      if (maze[i][0] == 's') {
        s = i;
      }
    }
    dfs(s, 0);
    if (ans)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
