#include <bits/stdc++.h>
using namespace std;
int n, k;
char s[4][110];
bool vis[4][110];
queue<pair<int, int> > q;
int main() {
  int test;
  scanf("%d", &test);
  while (test--) {
    scanf("%d%d", &n, &k);
    pair<int, int> st;
    for (int i = 1; i <= 3; i++) {
      scanf("%s", s[i] + 1);
      for (int j = 1; j <= n; j++) {
        if (s[i][j] == 's') {
          st = pair<int, int>(i, j);
        }
        vis[i][j] = 0;
      }
    }
    q.push(st);
    vis[st.first][st.second] = 1;
    bool suc = 0;
    while (q.size()) {
      pair<int, int> now = q.front();
      q.pop();
      if (now.second == n || (now.second == n - 1 && s[now.first][n] == '.') ||
          (now.second == n - 2 && s[now.first][n - 1] == '.' &&
           s[now.first][n] == '.')) {
        suc = 1;
        break;
      }
      if (s[now.first][now.second + 1] != '.') continue;
      for (int i = -1; i <= 1; i++) {
        if (now.first + i >= 1 && now.first + i <= 3 && now.second + 3 <= n &&
            s[now.first + i][now.second + 1] == '.' &&
            s[now.first + i][now.second + 2] == '.' &&
            s[now.first + i][now.second + 3] == '.') {
          pair<int, int> nxt(now.first + i, now.second + 3);
          if (!vis[nxt.first][nxt.second]) {
            vis[nxt.first][nxt.second] = 1;
            q.push(nxt);
          }
        }
      }
    }
    while (q.size()) q.pop();
    puts(suc ? "YES" : "NO");
  }
  return 0;
}
