#include <bits/stdc++.h>
using namespace std;
const int Maxn = 200;
bool lve[5][Maxn + 10];
char mp[5][Maxn + 10];
int n, k;
inline bool solve() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= 3; i++) scanf("%s", mp[i] + 1);
  memset(lve, false, sizeof(lve));
  for (int i = 1; i <= 3; i++)
    for (int j = 1; j <= n; j++)
      if (mp[i][j] == 's') lve[i][j] = true;
  for (int j = 1; j <= n; j++)
    for (int i = 1; i <= 3; i++)
      if (lve[i][j]) {
        if (j >= n) return true;
        if (mp[i][j + 1] != '.') continue;
        for (int k = -1; k <= 1; k++) {
          if (i + k > 3 || i + k < 1) continue;
          if (mp[i + k][j + 1] != '.') continue;
          if (j + 1 >= n) return true;
          if (mp[i + k][j + 2] != '.') continue;
          if (j + 2 >= n) return true;
          if (mp[i + k][j + 3] != '.') continue;
          if (j + 3 >= n) return true;
          lve[i + k][j + 3] = true;
        }
      }
  return false;
}
int main() {
  int T = 0;
  while (scanf("%d", &T) != EOF)
    for (int i = 1; i <= T; i++)
      if (solve())
        printf("YES\n");
      else
        printf("NO\n");
  return 0;
}
