#include <bits/stdc++.h>
using namespace std;
int n, dp[4][101][2];
char grid[4][500];
bool valid(int x, int y, bool b) {
  if (x == 1) return true;
  if (y < 1 || y > 3) return false;
  x = x + 2 * (x - 2);
  if (b)
    return (x > n || grid[y][x] == '.');
  else
    return (x > n || grid[y][x] == '.') && (x + 2 > n || grid[y][x + 2] == '.');
}
bool solve(int x, int y, bool b) {
  if (!valid(x, y, b)) return 0;
  if (x >= n) return 1;
  int& ret = dp[y][x][b];
  if (ret != -1) return ret;
  if (b)
    ret = solve(x, y, !b) || solve(x, y + 1, !b) || solve(x, y - 1, !b);
  else
    ret = solve(x + 1, y, !b);
  return ret;
}
int main() {
  int t, k, y, i;
  cin >> t;
  while (t--) {
    scanf("%d %d", &n, &k);
    memset(dp, -1, sizeof(dp));
    for (i = 1; i <= 3; ++i) scanf("%s", grid[i] + 1);
    for (i = 1; i <= 3; ++i)
      if (grid[i][1] == 's') y = i;
    printf("%s\n", solve(1, y, 0) ? "YES" : "NO");
  }
  return 0;
}
