#include <bits/stdc++.h>
using namespace std;
int t, n, k, dp[5], r[5];
char s[4][101];
bool ck(int i, int j) { return i < n && s[j][i] != '.'; }
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d", &n, &k);
    for (int i = 1; i <= 3; i++) {
      scanf("%s", s[i]);
      r[i] = dp[i] = s[i][1] == '.' && s[i][0] == 's';
    }
    for (int t = 1, i = 1; i < n; i++, t++) {
      for (int j = 1; j <= 3; j++)
        if (!ck(i + t * 2 - 2, j)) {
          dp[j + 1] = max(r[j], dp[j + 1]);
          dp[j - 1] = max(r[j], dp[j - 1]);
        }
      for (int j = 1; j <= 3; r[j] = dp[j], j++)
        if (ck(i + t * 2 - 2, j) || ck(i + t * 2 - 1, j) || ck(i + t * 2, j))
          dp[j] = 0;
    }
    if (dp[1] || dp[2] || dp[3])
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
