#include <bits/stdc++.h>
using namespace std;
const int N = 100;
int n, m;
char a[3][3 * N + 5];
int dp[3][N + 5];
bool solve(int x, int y) {
  int &ret = dp[x][y];
  if (ret != -1) return ret;
  if (y == n) return ret = true;
  if (a[x][y + 1 + (y - 1) * 2] != '.') return ret = false;
  if (a[x][y + 1 + (y - 1) * 2] == '.' &&
      a[x][y + 1 + (y - 1) * 2 + 1] == '.' &&
      a[x][y + 1 + (y - 1) * 2 + 2] == '.' && solve(x, y + 1))
    return ret = true;
  if (x > 0 && a[x - 1][y + 1 + (y - 1) * 2] == '.' &&
      a[x - 1][y + 1 + (y - 1) * 2 + 1] == '.' &&
      a[x - 1][y + 1 + (y - 1) * 2 + 2] == '.' && solve(x - 1, y + 1))
    return ret = true;
  if (x < 2 && a[x + 1][y + 1 + (y - 1) * 2] == '.' &&
      a[x + 1][y + 1 + (y - 1) * 2 + 1] == '.' &&
      a[x + 1][y + 1 + (y - 1) * 2 + 2] == '.' && solve(x + 1, y + 1))
    return ret = true;
  return ret = false;
}
int main() {
  int tests;
  scanf("%d", &tests);
  while (tests--) {
    scanf("%d %d", &n, &m);
    memset(dp, -1, sizeof dp);
    for (int i = 0; i < 3; i++) {
      for (int j = 1; j <= 3 * n; j++) {
        a[i][j] = '.';
      }
    }
    for (int i = 0; i < 3; i++) {
      for (int j = 1; j <= n; j++) scanf(" %c", a[i] + j);
    }
    bool ans;
    if (a[0][1] == 's') ans = solve(0, 1);
    if (a[1][1] == 's') ans = solve(1, 1);
    if (a[2][1] == 's') ans = solve(2, 1);
    puts(ans ? "YES" : "NO");
  }
  return 0;
}
