#include <bits/stdc++.h>
using namespace std;
queue<pair<pair<int, int>, int> > Q;
bool chk[111][111][111];
bool block[111][111][111];
int dx[] = {-1, 0, 1};
int dy[] = {1, 1, 1};
int n;
bool valid(int x, int y) { return (x >= 0 && x < 3 && y >= 0 && y < n); }
void solve(pair<int, int> S) {
  while (!Q.empty()) Q.pop();
  memset(chk, false, sizeof chk);
  Q.push(make_pair(S, 0));
  chk[S.first][S.second][0] = true;
  while (!Q.empty()) {
    pair<int, int> P = Q.front().first;
    int t = Q.front().second;
    Q.pop();
    for (int i = 0; i < 3; i++) {
      int x = P.first + dx[i], y = P.second + dy[i];
      if (valid(x, y) && valid(P.first, P.second + 1) &&
          !block[P.first][P.second + 1][t] && !block[x][y][t + 1] &&
          !block[x][y][t] && !chk[x][y][t + 1]) {
        chk[x][y][t + 1] = true;
        Q.push(make_pair(make_pair(x, y), t + 1));
      }
    }
  }
  if (chk[0][n - 1][n - 1] || chk[1][n - 1][n - 1] || chk[2][n - 1][n - 1])
    puts("YES");
  else
    puts("NO");
}
string S[4];
int main() {
  int test;
  cin >> test;
  while (test--) {
    int t;
    cin >> n >> t;
    pair<int, int> st;
    for (int i = 0; i < 3; i++) {
      cin >> S[i];
      for (int j = 0; j < n; j++) {
        if (S[i][j] == 's')
          st = make_pair(i, j);
        else if (S[i][j] != '.') {
          for (int k = j; k < n; k++) {
            if (S[i][k] == '.') break;
            int l = k, time = 0;
            while (l >= 0) {
              block[i][l][time] = true;
              l -= 2;
              time++;
            }
            j = k;
          }
        }
      }
    }
    solve(st);
    memset(block, false, sizeof block);
  }
  return 0;
}
