#include <bits/stdc++.h>
using namespace std;
int t, n, k, num[4][305], fg[4][305], fg1;
void dfs(int pe1, int pe2, int t) {
  if (pe2 == n && num[pe1][pe2 + 2 * t] != 1) {
    fg1 = true;
    return;
  }
  if (fg[pe1][pe2] == 0) {
    fg[pe1][pe2] = 1;
    if (num[pe1][pe2 + 1 + 2 * (t + 1)] != 1 &&
        num[pe1][pe2 + 2 * t + 1] != 1) {
      int x = pe2 + 1, y = t + 1;
      dfs(pe1, x, y);
    }
    if (pe1 - 1 > 0 && num[pe1 - 1][pe2 + 1 + 2 * (t + 1)] != 1 &&
        num[pe1 - 1][pe2 + 1 + 2 * t] != 1 && num[pe1][pe2 + 1 + 2 * t] != 1) {
      int x = pe1 - 1, y = pe2 + 1, s = t + 1;
      dfs(x, y, s);
    }
    if (pe1 + 1 < 4 && num[pe1 + 1][pe2 + 1 + 2 * (t + 1)] != 1 &&
        num[pe1 + 1][pe2 + 1 + 2 * t] != 1 && num[pe1][pe2 + 1 + 2 * t] != 1) {
      int x = pe1 + 1, y = pe2 + 1, s = t + 1;
      dfs(x, y, s);
    }
  }
}
int main() {
  cin >> t;
  while (t--) {
    int i, j, pe;
    char ss[105];
    scanf("%d%d", &n, &k);
    memset(num, 0, sizeof(num));
    memset(fg, 0, sizeof(fg));
    for (i = 1; i <= 3; i++) {
      scanf("%s", ss);
      for (j = 0; j < n; j++) {
        if (ss[j] == 's')
          pe = i;
        else if (ss[j] != '.') {
          int p = j + 1;
          num[i][p] = 1;
        }
      }
    }
    fg1 = false;
    dfs(pe, 1, 0);
    if (fg1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
