#include <bits/stdc++.h>
using namespace std;
const int max_n = 105;
int t, n, k;
char G[3][max_n];
bool solve() {
  queue<pair<int, int> > que;
  cin >> n >> k;
  for (int j = 0; j < 3; j++) {
    scanf("%s", G[j] + 1);
  }
  for (int j = 0; j < 3; j++) {
    if (G[j][1] == 's') {
      G[j][1] = '.';
      que.push(make_pair(j, 1));
    }
  }
  while (!que.empty()) {
    int S = que.size();
    int visit[3][max_n];
    memset(visit, 0, sizeof(visit));
    while (S--) {
      pair<int, int> p = que.front();
      que.pop();
      int x = p.first, y = p.second;
      if (y == n) return true;
      if (G[x][y] != '.') continue;
      if (G[x][y + 1] == '.') {
        for (int a = -1; a <= 1; a++) {
          if (x + a >= 0 && x + a <= 2 && G[x + a][y + 1] == '.' &&
              !visit[x + a][y + 1]) {
            que.push(make_pair(x + a, y + 1));
            visit[x + a][y + 1] = 1;
          }
        }
      }
    }
    for (int j = 0; j < 3; j++) {
      for (int a = 1; a <= n - 2; a++) {
        G[j][a] = G[j][a + 2];
      }
      G[j][n - 1] = G[j][n] = '.';
    }
  }
  return false;
}
int main() {
  scanf("%d", &t);
  for (int i = 0; i < t; i++) {
    if (solve())
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
