#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int INF = 0x7f7f7f7f;
const double eps = 1e-6;
const int maxn = 13333;
struct node {
  int mov, posx, posy;
  node() {}
  node(int mov, int posx, int posy) : mov(mov), posx(posx), posy(posy) {}
};
node q[maxn];
int g[111][5][111];
bool track[111][5][111];
int n, trains, sx, sy;
int dx[] = {-1, 1, 0};
int dy[] = {0, 0, 0};
bool isvalid(int i, int j) { return i >= 0 and i < 3 and j >= 0 and j < n; }
bool bfs() {
  int b = 0, e = 0;
  q[e++] = node(0, sx, sy);
  track[0][sx][sy] = true;
  while (b != e) {
    node aa = q[b++];
    int mm = aa.mov;
    int xx = aa.posx;
    int yy = aa.posy + 1;
    if (yy == n) return true;
    if (g[mm][xx][yy]) continue;
    for (int i = 0; i < 3; i++) {
      int dxi = xx + dx[i];
      int dyi = yy + dy[i];
      if (!isvalid(dxi, dyi)) continue;
      if (track[mm + 1][dxi][dyi]) continue;
      if (!g[mm][dxi][dyi] and !g[mm + 1][dxi][dyi]) {
        track[mm + 1][dxi][dyi] = true;
        q[e++] = node(mm + 1, dxi, dyi);
      }
    }
  }
  return false;
}
void solve() {
  cin >> n >> trains;
  for (int i = 0; i < 3; i++) {
    string ss;
    cin >> ss;
    for (int j = 0; j < n; j++) {
      g[0][i][j] = (ss[j] >= 'A' and ss[j] <= 'Z');
      if (ss[j] == 's') {
        sx = i;
        sy = j;
      }
    }
  }
  for (int move = 1; move <= 50; move++) {
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < n; j++) g[move][i][j] = g[move - 1][i][j + 2];
    }
  }
  if (bfs())
    puts("YES");
  else
    puts("NO");
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    memset(track, false, sizeof track);
    memset(g, 0, sizeof g);
    solve();
  }
  return 0;
}
