#include <bits/stdc++.h>
using namespace std;
int n, m, x, y, z, k, tc, w;
char S[3][105];
int A[3][105][105];
bool ok;
struct node {
  int x, y, turn;
} tmp, a;
queue<node> Q;
bool check(int x, int y, int t) {
  if (x < 0 || x >= 3) return 0;
  for (int i = (-2); i <= (1); i++)
    if (y + t * 2 + i >= 0 && y + t * 2 + i < n && S[x][y + t * 2 + i] != '.')
      return 0;
  return 1;
}
int main() {
  scanf("%d", &tc);
  while (tc--) {
    scanf("%d%d", &n, &m);
    for (int i = (0); i < (3); i++) scanf("%s", S[i]);
    for (int i = (0); i < (3); i++)
      for (int j = (0); j < (n); j++)
        if (S[i][j] == 's') {
          x = i;
          y = j;
          break;
        }
    if (S[x][y + 1] != '.') {
      printf("NO\n");
      continue;
    }
    memset(A, 0, sizeof(A));
    A[x][y][0] = 1;
    ok = 0;
    tmp.x = x;
    tmp.y = y;
    tmp.turn = 0;
    Q.push(tmp);
    while (!Q.empty()) {
      tmp = Q.front();
      Q.pop();
      for (int i = (-1); i <= (1); i++)
        if (check(tmp.x + i, tmp.y + 1, tmp.turn + 1)) {
          a.x = tmp.x + i;
          a.y = tmp.y + 1;
          a.turn = tmp.turn + 1;
          if (A[a.x][a.y][a.turn] == 0) {
            A[a.x][a.y][a.turn] = 1;
            Q.push(a);
            if (a.y == n - 1) ok = 1;
          }
        }
      if (ok) break;
    }
    while (!Q.empty()) Q.pop();
    if (ok)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
