#include <bits/stdc++.h>
using namespace std;
char mp[3][105];
bool vis[3][105];
int dir[3][2] = {{1, 0}, {-1, 0}, {0, 0}};
int t, k, n;
bool ff;
void dfs(int x, int y) {
  vis[x][y] = 1;
  if (ff) return;
  if (y >= n - 1) {
    ff = 1;
    return;
  }
  int dx = x;
  int dy = y + 1;
  if (mp[dx][dy] != '.') return;
  for (int i = 0; i < 3; i++) {
    int ddx = dx + dir[i][0];
    int ddy = dy + dir[i][1];
    if (ddx < 0 || ddx >= 3 || mp[ddx][ddy] != '.' || mp[ddx][ddy + 2] != '.' ||
        mp[ddx][ddy + 1] != '.' || vis[ddx][ddy + 2])
      continue;
    dfs(ddx, ddy + 2);
  }
}
int main() {
  scanf("%d", &t);
  while (t--) {
    ff = 0;
    memset(vis, false, sizeof(vis));
    scanf("%d%d", &n, &k);
    for (int i = 0; i < 3; i++) scanf("%s", mp[i]);
    for (int i = n; i < 105; i++) {
      for (int j = 0; j < 3; j++) mp[j][i] = '.';
    }
    for (int i = 0; i < 3; i++)
      if (mp[i][0] == 's') {
        int fx = i;
        int fy = 0;
        dfs(fx, fy);
        break;
      }
    if (ff)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
