#include <bits/stdc++.h>
using namespace std;
int n;
char s[3][205];
int daleko[3][205];
int dx[] = {-1, 0, 1};
void dfs(int i, int j) {
  if (j == n - 1) {
    daleko[i][j] = 2;
    return;
  }
  if (daleko[i][j] != -1) return;
  if ((3 * j + 1 < n && s[i][3 * j + 1] == '.') || (3 * j + 1 >= n)) {
    for (int u = (0); u < (3); ++u) {
      int ni = i + dx[u];
      if (ni >= 0 && ni <= 2) {
        bool ok = true;
        for (int k = (1); k < (4); ++k) {
          if (3 * j + k < n && s[ni][3 * j + k] != '.') ok = false;
        }
        if (ok) {
          dfs(ni, j + 1);
          daleko[i][j] = max(daleko[i][j], daleko[ni][j + 1]);
        }
      }
    }
  }
  daleko[i][j] = max(daleko[i][j], 1);
}
int main() {
  int(z);
  scanf("%d", &(z));
  ;
  while (z--) {
    scanf("%d", &(n));
    ;
    int(k);
    scanf("%d", &(k));
    ;
    for (int i = (0); i < (3); ++i) scanf("%s", s[i]);
    for (int i = (0); i < (n); ++i)
      for (int j = (0); j < (3); ++j) daleko[j][i] = -1;
    for (int j = (0); j < (3); ++j) {
      if (s[j][0] == 's') {
        dfs(j, 0);
        if (daleko[j][0] == 2)
          printf("YES\n");
        else
          printf("NO\n");
      }
    }
  }
}
