#include <bits/stdc++.h>
using namespace std;
char mp[5][220];
struct Point {
  int x, y;
  Point() {}
  Point(int _x, int _y) : x(_x), y(_y) {}
};
int n, K;
bool inMap(int x, int y) {
  if (x <= 0 || x > 3) return false;
  return true;
}
bool vis[5][220];
queue<Point> q;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    while (!q.empty()) q.pop();
    memset(vis, false, sizeof(vis));
    memset(mp, 0, sizeof(mp));
    scanf("%d%d", &n, &K);
    for (int i = 1; i <= 3; i++) scanf("%s", mp[i] + 1);
    for (int i = 1; i <= 3; i++)
      for (int j = 1; j <= 10; j++) mp[i][n + j] = '.';
    int sx, sy;
    for (int i = 1; i <= 3; i++)
      if (mp[i][1] == 's') {
        sx = i, sy = 1;
      }
    q.push(Point(sx, sy));
    bool flag = true;
    vis[sx][sy] = true;
    while (!q.empty()) {
      Point now = q.front();
      q.pop();
      if (now.y > n) {
        printf("YES\n");
        flag = false;
        break;
      }
      for (int xx = -1; xx <= 1; xx++) {
        int newx = now.x + xx, newy = now.y + 1;
        if (inMap(newx, newy)) {
          if (mp[now.x][newy] == '.' && mp[newx][newy] == '.' &&
              mp[newx][newy + 1] == '.' && mp[newx][newy + 2] == '.' &&
              (!vis[newx][newy + 2])) {
            q.push(Point(newx, newy + 2));
            vis[newx][newy + 2] = true;
          }
        }
      }
    }
    if (flag) printf("NO\n");
  }
  return 0;
}
