#include <bits/stdc++.h>
using namespace ::std;
const int inf = 0x3f3f3f3f;
const double pi = acos(0.0) * 2.0;
const double eps = 1e-8;
const int maxn = 1e2 + 10;
const int maxm = 1e5 + 10;
const int mod = 1e9 + 7;
int n, k;
char s[3][maxn];
int sx, sy;
int vis[maxn][maxn];
queue<pair<int, int> > q;
const int dx[] = {1, 0, -1};
bool check(int x, int y) {
  for (int i = 0; i < 3; i++) {
    if (s[x][y + i] != '.' && s[x][y + i] != 's') return false;
  }
  return true;
}
void bfs() {
  memset(vis, 0, sizeof(vis));
  while (!q.empty()) q.pop();
  vis[sx][sy] = 1;
  q.push(pair<int, int>(sx, sy));
  while (!q.empty()) {
    pair<int, int> p = q.front();
    q.pop();
    if (p.second == n - 1) {
      puts("YES");
      return;
    }
    p.second++;
    if (s[p.first][p.second] != '.') continue;
    if (p.second == n - 1 ||
        (s[p.first][p.second + 1] == '.' && p.second == n - 2)) {
      puts("YES");
      return;
    }
    for (int i = 0; i < 3; i++) {
      int nx = p.first + dx[i], ny = p.second + 2;
      if (0 <= nx && nx < 3 && 0 <= ny && ny < n && check(nx, p.second) &&
          !vis[nx][ny]) {
        q.push(pair<int, int>(nx, ny));
        vis[nx][ny] = 1;
      }
    }
  }
  puts("NO");
  return;
}
void solve() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < 3; i++) scanf("%s", s[i]);
  for (int i = 0; i < 3; i++)
    if (s[i][0] == 's') {
      sx = i, sy = 0;
      break;
    }
  bfs();
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}
