#include <bits/stdc++.h>
using namespace std;
const int N = 1e7;
const double eps = 1e-8;
const int mod = 1e9 + 7;
const double pi = acos(-1.0);
char s[3][105];
bool vis[3][105];
struct Node {
  int line, l, r;
  Node(int a = 0, int b = 0, int c = 0) : line(a), l(b), r(c) {}
};
vector<Node> G;
int n;
bool can() {
  bool ans = 0;
  for (int i = 0; i < 3; i++) ans |= vis[i][n - 1];
  return ans;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int m;
    scanf("%d%d", &n, &m);
    memset(vis, 0, sizeof(vis));
    for (int i = 0; i < 3; i++) scanf("%s", s[i]);
    G.clear();
    for (int i = 0; i < 3; i++) {
      Node now(-1, -1, -1);
      for (int j = 0, c = '.'; j < n; j++)
        if (isalpha(s[i][j])) {
          if (c != s[i][j]) {
            if (isalpha(c)) {
              G.push_back(now);
              now.line = -1;
            }
            now.line = i;
            now.l = now.r = j;
          } else
            now.r = j;
          c = s[i][j];
        }
      if (now.line != -1) G.push_back(now);
    }
    for (int i = 0; i < 3; i++)
      if ('s' == s[i][0]) vis[i][0] = 1;
    for (int i = 0; i - 1 < n; i++) {
      for (int j = 0; j < 3; j++)
        if (vis[j][i]) {
          bool yes = 1;
          for (auto v : G)
            if (v.line == j && v.l <= i + 1 && i + 1 <= v.r) yes = 0;
          if (!yes) continue;
          for (int u = 0; u < 3; u++) {
            if (abs(j - u) > 1) continue;
            bool yes = 1;
            for (auto v : G)
              if (v.line == u && v.l - 2 <= i + 1 && i + 1 <= v.r) yes = 0;
            if (yes) vis[u][i + 1] = 1;
          }
        }
      for (int j = 0; j < G.size(); j++) G[j].l -= 2, G[j].r -= 2;
    }
    if (can())
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
