#include <bits/stdc++.h>
using namespace std;
int n, t;
int a[4][107];
char ch[107];
int dir[3][2] = {{-1, 3}, {0, 3}, {1, 3}};
bool vis[4][107];
int dfs(int x, int y) {
  if (y > n) return 1;
  vis[x][y] = 1;
  int ans = 0;
  for (int i = 0; i < 3; i++) {
    int fx = x + dir[i][0], fy = y + dir[i][1];
    if (fx <= 0 || fx > 3 || a[x][y + 1] == 1 || a[fx][fy - 1] == 1 ||
        a[fx][fy - 2] == 1 || a[fx][fy] == 1)
      continue;
    if (vis[fx][fy]) continue;
    ans = max(ans, dfs(fx, fy));
    if (ans == 1) return 1;
  }
  return 0;
}
int k;
int main() {
  scanf("%d", &t);
  while (t--) {
    memset(vis, 0, sizeof(vis));
    memset(a, 0, sizeof(a));
    int x, y;
    scanf("%d%d", &n, &k);
    for (int i = 1; i <= 3; i++) {
      scanf("%s", ch + 1);
      for (int j = 1; j <= n; j++) {
        if (ch[j] == 's') x = i, y = j;
        if (ch[j] != '.' && ch[j] != 's') a[i][j] = 1;
      }
    }
    int ans = dfs(x, y);
    if (ans == 0)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
