#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
int n, k, ans;
char mp[3][maxn];
int vis[3][maxn];
int dfs(int x, int y) {
  vis[x][y] = 1;
  if (y >= n - 1) return true;
  if (mp[x][y + 1] != '.') return false;
  for (int i = 0; i < 3; i++) {
    if (abs(i - x) > 1) continue;
    int flag = 0;
    for (int j = 1; j < 4; j++) {
      if (mp[i][y + j] != '.') {
        flag = 1;
        break;
      }
    }
    if (flag) continue;
    if (!vis[i][y + 3]) {
      int flag = dfs(i, y + 3);
      if (flag) return 1;
    }
  }
  return 0;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    memset(mp, 0, sizeof(mp));
    memset(vis, 0, sizeof(vis));
    ans = 0;
    scanf("%d%d", &n, &k);
    for (int i = 0; i < 3; i++) {
      scanf("%s", mp[i]);
      for (int j = 0; j < 5; j++) mp[i][n + j] = '.';
      mp[i][n + 5] = '\0';
    }
    for (int i = 0; i < 3; i++) {
      if (mp[i][0] == 's') {
        int ans = dfs(i, 0);
        if (ans)
          printf("YES\n");
        else
          printf("NO\n");
        break;
      }
    }
  }
  return 0;
}
