#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1E9 + 10;
const double EPS = 1E-9;
const int MAXN = (int)(110);
const int MOD = (int)(1e9 + 7);
struct pt {
  int col, len, pos;
};
pt arr[MAXN * 3];
char str[3][MAXN];
int len;
bool a, b, c, an, bn, cn, ma, mb, mc;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    scanf("%s", str[0]);
    scanf("%s", str[1]);
    scanf("%s", str[2]);
    len = 0;
    for (int j = 0; j < 3; j++) {
      for (int i = 1; i < n; i++) {
        if (str[j][i] != '.') {
          arr[len].pos = j;
          arr[len].col = i;
          int l = 0;
          while (str[j][i + l] != '.' && (i + l) < n) l++;
          arr[len++].len = l;
          i += l;
        }
      }
    }
    a = b = c = an = bn = cn = 0;
    if (str[0][0] == 's') a = 1;
    if (str[1][0] == 's') b = 1;
    if (str[2][0] == 's') c = 1;
    if (str[0][1] != '.') ma = 1;
    if (str[1][1] != '.') mb = 1;
    if (str[2][1] != '.') mc = 1;
    for (int t = 1; t < n; t++) {
      if (a && !ma) {
        an = 1;
        if (!mb) bn = 1;
      }
      if (b && !mb) {
        bn = 1;
        if (!ma) an = 1;
        if (!mc) cn = 1;
      }
      if (c && !mc) {
        cn = 1;
        if (!mb) bn = 1;
      }
      ma = 0;
      mb = 0;
      mc = 0;
      for (int j = 0; j < len; j++) {
        arr[j].col -= 2;
        if (t >= arr[j].col && t <= (arr[j].col + arr[j].len - 1)) {
          if (arr[j].pos == 0) an = 0;
          if (arr[j].pos == 1) bn = 0;
          if (arr[j].pos == 2) cn = 0;
        }
        if ((t + 1) >= arr[j].col && (t + 1) <= (arr[j].col + arr[j].len - 1)) {
          if (arr[j].pos == 0) ma = 1;
          if (arr[j].pos == 1) mb = 1;
          if (arr[j].pos == 2) mc = 1;
        }
      }
      a = an;
      b = bn;
      c = cn;
      an = bn = cn = 0;
    }
    if (a || b || c)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
