#include <bits/stdc++.h>
const int maxn = 1e6 + 10;
using namespace std;
int n, k;
char mapp[110][110];
int vis[110][110];
struct node {
  int x;
  int y;
} start, now;
queue<node> q;
int istrue(int x, int y) {
  if ((mapp[x][y] >= 'a' && mapp[x][y] <= 'z') ||
      (mapp[x][y] >= 'A' && mapp[x][y] <= 'Z'))
    return 1;
  else
    return 0;
}
int bfs(int x, int y) {
  while (!q.empty()) {
    q.pop();
  }
  int i;
  memset(vis, 0, sizeof(vis));
  start.x = x;
  start.y = y;
  vis[x][y] = 1;
  q.push(start);
  while (!q.empty()) {
    now = q.front();
    q.pop();
    if (now.y >= n) return 1;
    now.y += 1;
    if (istrue(now.x, now.y)) {
      continue;
    }
    for (i = -1; i <= 1; i++) {
      start.x = now.x + i;
      start.y = now.y;
      if (start.x >= 1 && start.x <= 3) {
        if (istrue(start.x, start.y) || istrue(start.x, start.y + 1) ||
            istrue(start.x, start.y + 2))
          continue;
        if (vis[start.x][start.y + 2] == 1) continue;
        start.y += 2;
        vis[start.x][start.y] = 1;
        if (start.y >= n) return 1;
        q.push(start);
      }
    }
  }
  return 0;
}
int main() {
  int T;
  int c, d;
  cin >> T;
  while (T--) {
    cin >> n >> k;
    for (int i = 1; i <= 3; i++) {
      cin >> mapp[i] + 1;
    }
    for (int i = 1; i <= 3; i++) {
      for (int j = 1; j <= n; j++) {
        if (mapp[i][j] == 's') {
          c = i;
          d = j;
        }
      }
    }
    int flag = bfs(c, d);
    if (flag == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
