#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int maxn = 1e6 + 10;
const int maxv = 1e3 + 10;
const double eps = 1e-9;
inline int read() {
  char c = getchar();
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  int x = 0;
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
int t;
char mp[6][105];
int n, m;
int stx, sty;
int check(int x, int y) { return x >= 1 && x <= 3; }
int vis[6][105];
bool bfs() {
  queue<pair<int, int> > que;
  que.push(pair<int, int>(stx, sty));
  memset(vis, 0, sizeof vis);
  while (que.size()) {
    int x = que.front().first;
    int y = que.front().second;
    vis[x][y] = 0;
    que.pop();
    y += 1;
    if (isalpha(mp[x][y])) continue;
    if (y >= n) return true;
    for (int i = -1; i <= 1; i++) {
      int nx = x + i;
      if (isalpha(mp[nx][y])) continue;
      int ny = y + 2;
      if (check(nx, ny) && !isalpha(mp[nx][ny]) && !isalpha(mp[nx][ny - 1])) {
        if (!vis[nx][ny]) {
          que.push(pair<int, int>(nx, ny));
          vis[nx][ny] = 1;
        }
      }
    }
  }
  return false;
}
int main() {
  scanf("%d", &t);
  while (t--) {
    memset(mp, 0, sizeof mp);
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= 3; i++) {
      scanf("%s", &mp[i][1]);
    }
    for (int i = 1; i <= 3; i++) {
      for (int j = 1; j <= n; j++) {
        if (mp[i][j] == 's') {
          stx = i, sty = j;
        }
      }
    }
    mp[1][n + 1] = mp[2][n + 1] = mp[3][n + 1] = '.';
    if (bfs())
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
