#include <bits/stdc++.h>
using namespace std;
int ara[4][402], dp[4][111], m;
int solve(int row, int col) {
  if (col == m)
    return 1;
  else if (dp[row][col] != -1)
    return dp[row][col];
  else {
    int p = 0, q = 0, r = 0, s, t, u, v, fr, sc, tr;
    fr = col + 1;
    u = (col - 1) * 2;
    if (ara[row][fr + u] == 0) {
      v = col * 2;
      if (ara[row][fr + v] == 0 && ara[row][fr + v - 1] == 0 &&
          ara[row][fr + u] == 0)
        p = solve(row, fr);
      if ((row - 1) >= 1) {
        if (ara[row - 1][fr + v] == 0 && ara[row - 1][fr + v - 1] == 0 &&
            ara[row - 1][fr + u] == 0)
          q = solve(row - 1, fr);
      }
      if ((row + 1) <= 3) {
        if (ara[row + 1][fr + v] == 0 && ara[row + 1][fr + v - 1] == 0 &&
            ara[row + 1][fr + u] == 0)
          r = solve(row + 1, fr);
      }
    }
    s = p | q;
    t = s | r;
    dp[row][col] = t;
    return dp[row][col];
  }
}
int main() {
  int tc, o;
  scanf("%d", &tc);
  for (o = 1; o <= tc; o++) {
    int k, i, j, ans, x, y;
    char s[111];
    scanf("%d %d", &m, &k);
    for (i = 1; i <= 3; i++) {
      scanf("%s", s);
      for (j = 1; j <= m; j++) {
        if (s[j - 1] == 's') {
          x = i;
          y = j;
        } else if (s[j - 1] == '.')
          ara[i][j] = 0;
        else {
          ara[i][j] = 1;
        }
      }
    }
    memset(dp, -1, sizeof dp);
    ans = solve(x, y);
    if (ans == 1)
      printf("YES\n");
    else {
      printf("NO\n");
    }
    memset(ara, 0, sizeof ara);
  }
  return 0;
}
