#include <bits/stdc++.h>
using namespace std;
int t, n, k;
int dp[5][109][109];
int mat[5][109][109];
int tim;
int bt(int x, int y, int t) {
  if (x == 3) return 0;
  if (x == -1) return 0;
  if (t == tim + 1 || y >= n) {
    return 1;
  }
  if (dp[x][y][t] != -1) return dp[x][y][t];
  if (mat[x][y][t]) return 0;
  int &ret = dp[x][y][t];
  ret = 0;
  if (mat[x][y + 1][t])
    return 0;
  else
    ret = bt(x, y + 1, t + 1);
  if (x >= 0) {
    if (mat[x - 1][y + 1][t] == 0) ret = max(ret, bt(x - 1, y + 1, t + 1));
  }
  if (mat[x + 1][y + 1][t] == 0) ret = max(ret, bt(x + 1, y + 1, t + 1));
  return dp[x][y][t];
}
char c[3][109];
bool pointy(int x) {
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < n; j++)
      if (mat[i][j][x]) return 0;
  }
  return 1;
}
void bldm() {
  int id = 0;
  while (1) {
    for (int i = 0; i < 3; i++) {
      for (int j = id * 2, jj = 0; j < n; j++, jj++) {
        if (j >= n) {
          mat[i][jj][id] = 0;
          continue;
        }
        if (c[i][j] == '.')
          mat[i][jj][id] = 0;
        else if (c[i][j] != 's')
          mat[i][jj][id] = 1;
      }
    }
    if (pointy(id)) break;
    id++;
  }
  tim = id;
}
int main() {
  cin >> t;
start:;
  t--;
  memset(mat, 0, sizeof(mat));
  cin >> n >> k;
  memset(dp, -1, sizeof(dp));
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < n; j++) cin >> c[i][j];
  }
  bldm();
  int o;
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < n; j++)
      if (c[i][j] == 's') {
        o = bt(i, j, 0);
        break;
      }
  }
  if (o)
    cout << "YES\n";
  else
    cout << "NO\n";
  if (t) goto start;
}
