#include <bits/stdc++.h>
using namespace std;
int dp[5][105];
int n, tel;
char st[3][105];
pair<int, pair<int, int> > range[30];
int play(int pos, int movedone) {
  if (movedone == n - 1) return true;
  int &ret = dp[pos][movedone];
  if (ret != -1) return ret;
  ret = 0;
  for (int i = -1; i <= 1; i++) {
    int nxtx = pos + i;
    bool can = true;
    int nxty = movedone + 1;
    if (!(nxtx >= 0 && nxtx < 3)) continue;
    if (i == 0) {
      for (int k = 0; k < tel; k++) {
        int rk = range[k].first;
        int bk = range[k].second.first;
        int ek = range[k].second.second;
        if (rk != nxtx) continue;
        if (bk - movedone * 2 <= nxty && ek - movedone * 2 >= nxty) can = false;
        if (bk - nxty * 2 <= nxty && ek - nxty * 2 >= nxty) can = false;
      }
    } else {
      for (int j = 0; j < tel; j++) {
        int rj = range[j].first;
        int bj = range[j].second.first;
        int ej = range[j].second.second;
        if (rj != pos) continue;
        if (bj - movedone * 2 <= nxty && ej - movedone * 2 >= nxty) can = false;
        for (int k = 0; k < tel; k++) {
          int rk = range[k].first;
          int bk = range[k].second.first;
          int ek = range[k].second.second;
          if (k == j) continue;
          if (rk != nxtx) continue;
          if (bk - movedone * 2 <= nxty && ek - movedone * 2 >= nxty)
            can = false;
          if (bk - nxty * 2 <= nxty && ek - nxty * 2 >= nxty) can = false;
        }
      }
    }
    if (can) ret |= play(nxtx, nxty);
  }
  return ret;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    tel = 0;
    int k;
    memset(dp, -1, sizeof dp);
    scanf("%d %d", &n, &k);
    for (int i = 0; i < 3; i++) {
      scanf("%s", st[i]);
    }
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < n; j++) {
        if (st[i][j] != '.' && st[i][j] != 's') {
          int begin = j;
          while (j < n) {
            if (st[i][j] != '.' && st[i][j] != 's')
              j++;
            else
              break;
          }
          range[tel++] = make_pair(i, make_pair(begin, j - 1));
        }
      }
    }
    int mulai;
    for (int i = 0; i < 3; i++)
      if (st[i][0] == 's') mulai = i;
    if (play(mulai, 0))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
