#include <bits/stdc++.h>
using namespace std;
struct node {
  int lin;
  int col;
} aa, bb;
queue<node> q;
int t, n, k;
char c;
int mp[1005][5] = {0};
int vis[1005][5] = {0};
int dirx[3] = {-1, 0, 1};
int sx, sy, tx, ty, flag;
int main() {
  cin >> t;
  while (t--) {
    memset(mp, 0, sizeof(mp));
    memset(vis, 0, sizeof(vis));
    flag = 0;
    scanf("%d %d", &n, &k);
    for (int i = 1; i <= 3; i++) {
      for (int j = 1; j <= n; j++) {
        cin >> c;
        if (c == 's') {
          sx = j;
          sy = i;
        }
        if (c >= 'A' && c <= 'Z') {
          mp[j][i] = 1;
        }
      }
    }
    aa.lin = sx;
    aa.col = sy;
    q.push(aa);
    while (!q.empty()) {
      aa = q.front();
      if (aa.lin >= n) {
        flag = 1;
        while (!q.empty()) q.pop();
        break;
      }
      if (mp[aa.lin + 1][aa.col] == 1 || mp[aa.lin][aa.col] == 1) {
        q.pop();
        continue;
      }
      for (int i = 0; i < 3; i++) {
        tx = aa.lin + 1;
        ty = aa.col + dirx[i];
        if (ty < 1 || ty > 3) continue;
        if (mp[tx][ty] == 1) continue;
        tx = aa.lin + 2;
        if (mp[tx][ty] == 1) continue;
        tx = aa.lin + 3;
        if (mp[tx][ty] == 1) continue;
        if (vis[tx][ty] == 1) continue;
        vis[tx][ty] = 1;
        bb.lin = tx;
        bb.col = ty;
        q.push(bb);
      }
      q.pop();
    }
    if (flag == 1) printf("YES\n");
    if (flag == 0) printf("NO\n");
  }
  return 0;
}
