#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
char raw[4][maxn];
int dp[5][maxn];
int t, n, k;
int main() {
  while (~scanf("%d", &t)) {
    while (t--) {
      scanf("%d %d", &n, &k);
      memset(raw, 0, sizeof(raw));
      memset(dp, 0, sizeof(dp));
      scanf("%s%s%s", raw[1], raw[2], raw[3]);
      for (int i = 1; i <= 3; i++)
        if (raw[i][0] == 's') {
          dp[i][0] = 1;
          break;
        }
      for (int i = 3; i < n; i += 3) {
        for (int j = 1; j <= 3; j++) {
          if (raw[j][i] == '.' && raw[j][i - 1] == '.' &&
              raw[j][i - 2] == '.') {
            dp[j][i] = max(dp[j][i], dp[j][i - 3]);
            if (raw[j + 1][i - 2] == '.')
              dp[j][i] = max(dp[j][i], dp[j + 1][i - 3]);
            if (raw[j - 1][i - 2] == '.')
              dp[j][i] = max(dp[j][i], dp[j - 1][i - 3]);
          }
        }
      }
      for (int i = 1; i <= 3; i++) {
        if (raw[i][n - 1] == '.' && raw[i][n - 2] == '.' &&
            raw[i][n - 3] == '.')
          dp[i][n - 1] = max(dp[i][n - 1], max(dp[i][n - 2], dp[i][n - 3]));
      }
      bool ans = false;
      for (int i = 1; i <= 3; i++)
        if (dp[i][n - 1]) ans = true;
      if (ans)
        printf("YES\n");
      else
        printf("NO\n");
    }
  }
  return 0;
}
