#include <bits/stdc++.h>
using namespace std;
string grid[3];
int vis[3][110][1000], visID;
int t, n, k;
bool solve(int i, int j, int t) {
  if (j == n) return 1;
  if (j + t < n && grid[i][j + t] != '.' && grid[i][j + t] != 's') return 0;
  if (j + t + 1 < n && grid[i][j + t + 1] != '.') return 0;
  if (vis[i][j][t] == visID) return 0;
  vis[i][j][t] = visID;
  if (solve(i, j + 1, t + 2)) return 1;
  if (!i) {
    if (j + t + 1 >= n || grid[1][j + t + 1] == '.') {
      if (solve(1, j + 1, t + 2)) return 1;
    }
  } else if (i == 1) {
    if (j + t + 1 >= n || grid[0][j + t + 1] == '.') {
      if (solve(0, j + 1, t + 2)) return 1;
    }
    if (j + t + 1 >= n || grid[2][j + t + 1] == '.') {
      if (solve(2, j + 1, t + 2)) return 1;
    }
  } else {
    if (j + t + 1 >= n || grid[1][j + t + 1] == '.') {
      if (solve(1, j + 1, t + 2)) return 1;
    }
  }
  return 0;
}
int main() {
  scanf("%d", &t);
  for (int C = 0; C < t; ++C) {
    ++visID;
    scanf("%d", &n), scanf("%d", &k);
    for (int i = 0; i < 3; ++i) cin >> grid[i];
    for (int i = 0; i < 3; ++i) grid[i].push_back('.');
    if (grid[0][0] == 's' && solve(0, 0, 0))
      puts("YES");
    else if (grid[1][0] == 's' && solve(1, 0, 0))
      puts("YES");
    else if (grid[2][0] == 's' && solve(2, 0, 0))
      puts("YES");
    else
      puts("NO");
  }
}
