#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const long long LINF = (1LL << 63);
const int INF = 1 << 31;
const int NS = 110;
const int MS = 3;
const long long MOD = 1000000007;
int n, k;
int dp[MS][NS];
char str[MS][NS];
int mp[MS][NS];
int solve() {}
int main() {
  int nCase;
  while (~scanf("%d", &nCase)) {
    for (int nT = 1; nT <= nCase; nT++) {
      memset(dp, 0, sizeof(dp));
      scanf("%d %d", &n, &k);
      for (int i = 0; i < 3; i++) {
        scanf("%s", str[i]);
        str[i][n] = '.';
        str[i][n + 1] = '.';
        str[i][n + 2] = '.';
        str[i][n + 3] = '\0';
        if ('s' == str[i][0]) {
          dp[i][0] = 1;
        }
      }
      n += 3;
      for (int r = 0; r < 3; r++) {
        for (int c = 0; c < n; c++) {
          mp[r][c] = str[r][c] - '.';
        }
      }
      int step = 1;
      for (int i = 1; i < n;) {
        if (1 == step) {
          for (int j = 0; j < 3; j++) {
            if ((0 == mp[j][i]) && dp[j][i - 1] > 0) {
              dp[j][i] = 1;
            }
          }
          int state = 0;
          for (int j = 0; j < 3; j++) {
            if (dp[j][i] > 0) {
              for (int d = 1; d <= 1; d++) {
                int r = j + d;
                if (r < 3 && (0 == mp[r][i])) {
                  state |= (1 << r);
                } else {
                  break;
                }
              }
              for (int d = 1; d <= 1; d++) {
                int r = j - d;
                if (r >= 0 && (0 == mp[r][i])) {
                  state |= (1 << r);
                } else {
                  break;
                }
              }
            }
          }
          for (int j = 0; j < 3; j++) {
            dp[j][i] |= ((state >> j) & 1);
          }
        } else {
          int pre = i - 2;
          for (int j = 0; j < 3; j++) {
            if ((dp[j][pre] > 0) && (mp[j][pre + 1] == 0) && (0 == mp[j][i])) {
              dp[j][i] = 1;
            }
          }
        }
        step = 3 - step;
        i += step;
      }
      int ans = 0;
      for (int i = n - 3; i < n; i++) {
        for (int j = 0; j < 3; j++) {
          if (dp[j][i] > 0) {
            ans = 1;
          }
        }
      }
      if (ans) {
        printf("YES\n");
      } else {
        printf("NO\n");
      }
    }
  }
  return 0;
}
