#include <bits/stdc++.h>
using namespace std;
char s[4][105];
int cas, n, k;
struct Node {
  int x, y;
};
int main() {
  cin >> cas;
  while (cas--) {
    queue<Node> q;
    cin >> n >> k;
    Node cur;
    for (int i = 0; i < 3; i++) {
      scanf("%s", s[i]);
      s[i][n] = s[i][n + 1] = s[i][n + 2] = '.';
      if (s[i][0] == 's') {
        cur.x = i;
        cur.y = 0;
        q.push(cur);
      }
    }
    bool flag = false;
    while (!q.empty()) {
      cur = q.front();
      q.pop();
      int x = cur.x, y = cur.y;
      if (s[x][y + 1] != '.') continue;
      for (int i = x - 1; i <= x + 1; i++) {
        if (i < 0 || i >= 3) continue;
        if (s[i][y + 1] == '.' && s[i][y + 2] == '.' && s[i][y + 3] == '.') {
          if (y + 3 >= n - 1) {
            flag = true;
            break;
          }
          cur.x = i;
          cur.y = y + 3;
          s[cur.x][cur.y] = '#';
          q.push(cur);
        }
      }
    }
    if (flag)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
