#include <bits/stdc++.h>
using namespace std;
const int N = 200;
bool f[N][3];
int n, K;
struct Train {
  int row, l, r;
} a[N];
char str[4][N];
char nowMap[4][N];
int sx, sy;
bool isL(char first) { return 'A' <= first && first <= 'Z'; }
void getMapAtT(int t) {
  int i, j;
  for (i = 0; i < 3; i++) {
    for (j = 1; j <= n; j++) {
      if (j + t * 2 <= n) {
        nowMap[i][j] = str[i][j + 2 * t];
      } else
        nowMap[i][j] = '.';
    }
  }
}
void prMap() {
  int i, j;
  for (i = 0; i < 3; i++) {
    for (j = 1; j <= n; j++) {
      cerr << nowMap[i][j];
    }
    cerr << endl;
  }
  cerr << endl;
}
int main() {
  int cas;
  scanf("%d", &cas);
  int i, j, k;
  while (cas--) {
    scanf("%d%d", &n, &K);
    for (i = 0; i < 3; i++) scanf("%s", str[i] + 1);
    for (i = 0; i < 3; i++) {
      for (j = 1; j <= n; j++) {
        if (str[i][j] == 's') {
          sx = i;
          sy = j;
          str[i][j] = '.';
        }
      }
    }
    memset(f, false, sizeof(f));
    f[1][sx] = true;
    for (i = 1; i < n; i++) {
      getMapAtT(i - 1);
      for (j = 0; j < 3; j++) {
        if (f[i][j]) {
          for (k = -1; k <= 1; k++) {
            if (j + k >= 0 && j + k < 3) {
              if (nowMap[j][i + 1] == '.' && nowMap[j + k][i + 1] == '.' &&
                  (nowMap[j + k][i + 2] == '.' || i + 2 > n) &&
                  (nowMap[j + k][i + 3] == '.' || i + 3 > n)) {
                f[i + 1][j + k] = true;
              }
            }
          }
        }
      }
    }
    bool ans = false;
    for (i = 0; i < 3; i++) ans |= f[n][i];
    puts(ans ? "YES" : "NO");
  }
}
