#include <bits/stdc++.h>
using namespace std;
const int dx[3] = {-1, 0, 1};
char tunnel[4][105];
int n, k, testcase;
bool vis[4][105];
queue<pair<int, int> > q;
int main() {
  int i, j;
  bool flag;
  pair<int, int> now;
  scanf("%d", &testcase);
  while (testcase--) {
    memset(vis, false, sizeof(vis));
    while (!q.empty()) q.pop();
    scanf("%d%d", &n, &k);
    for (i = 1; i <= 3; ++i) scanf("%s", tunnel[i] + 1);
    for (i = 1; i <= 3; ++i)
      if (tunnel[i][1] == 's') {
        q.push(pair<int, int>(i, 1));
        vis[i][1] = true;
        break;
      }
    flag = false;
    while (!q.empty()) {
      now = q.front();
      q.pop();
      if (now.second == n) {
        flag = true;
        printf("YES\n");
        break;
      }
      if (tunnel[now.first][now.second + 1] != '.') continue;
      for (i = 0; i < 3; ++i) {
        now.first += dx[i];
        if (now.first < 1 || now.first > 3) {
          now.first -= dx[i];
          continue;
        }
        for (j = 1; j <= 3; ++j) {
          if (now.second + j > n) {
            printf("YES\n");
            flag = true;
            break;
          }
          if (tunnel[now.first][now.second + j] != '.') break;
        }
        if (flag) break;
        if (j == 4 && !vis[now.first][now.second + 3]) {
          now.second += 3;
          vis[now.first][now.second] = true;
          q.push(now);
          now.second -= 3;
        }
        now.first -= dx[i];
      }
      if (flag) break;
    }
    if (!flag) printf("NO\n");
  }
  return 0;
}
