#include <bits/stdc++.h>
using namespace std;
int n, k;
const int MX = 1e2 + 1, N = 1e2 + 1;
char g[3][N];
int dp[3][N][MX];
int vis[3][N][MX];
int id = 0;
bool can(int x, int y, int sec) {
  if (x < 0 || x == 3) return 0;
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < n; j++) {
      if (g[i][j] != '.' && j - 2 * sec == y && i == x) return 0;
    }
  return 1;
}
int solve(int i, int j, int sec) {
  if (j == n) return 1;
  int &ret = dp[i][j][sec];
  if (vis[i][j][sec] == id) return ret;
  vis[i][j][sec] = id;
  ret = 0;
  if (can(i, j + 1, sec)) {
    if (can(i, j + 1, sec + 1)) ret |= solve(i, j + 1, sec + 1);
    if (can(i + 1, j + 1, sec) && can(i + 1, j + 1, sec + 1))
      ret |= solve(i + 1, j + 1, sec + 1);
    if (can(i - 1, j + 1, sec) && can(i - 1, j + 1, sec + 1))
      ret |= solve(i - 1, j + 1, sec + 1);
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    id++;
    cin >> n >> k;
    int posx, posy;
    for (int i = 0; i < 3; i++)
      for (int j = 0; j < n; j++) {
        cin >> g[i][j];
        if (g[i][j] == 's') {
          posx = i;
          posy = j;
        }
      }
    if (solve(posx, posy, 0))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
