#include <bits/stdc++.h>
using namespace std;
int n, m, mark[4][155], ok;
char s[4][155];
void dfs(int x, int y) {
  if (ok) return;
  if (y >= n) {
    ok = 1;
    return;
  }
  if (mark[x][y] || s[x][y + 1] != '.') return;
  mark[x][y] = 1;
  if (s[x][y + 2] == '.' && s[x][y + 3] == '.') dfs(x, y + 3);
  if (x - 1 >= 1 && s[x - 1][y + 1] == '.' && s[x - 1][y + 2] == '.' &&
      s[x - 1][y + 3])
    dfs(x - 1, y + 3);
  if (x + 1 <= 3 && s[x + 1][y + 1] == '.' && s[x + 1][y + 2] == '.' &&
      s[x + 1][y + 3])
    dfs(x + 1, y + 3);
}
void solve() {
  scanf("%d%d", &n, &m);
  int x;
  for (int i = 1; i <= 3; i++) {
    scanf("%s", s[i] + 1);
    if (s[i][1] == 's') x = i;
    for (int j = n + 1; j <= n + 3; j++) s[i][j] = '.';
  }
  memset(mark, 0, sizeof(mark));
  ok = 0;
  dfs(x, 1);
  if (ok)
    printf("YES\n");
  else
    printf("NO\n");
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) solve();
  return 0;
}
