#include <bits/stdc++.h>
using namespace std;
int t, n, k, so;
bool vis[5][105];
char s[5][105];
bool bfs(int pos) {
  queue<pair<int, int> > q;
  q.push(make_pair(pos, 1));
  while (!q.empty()) {
    pair<int, int> now = q.front();
    int x = now.first, y = now.second;
    q.pop();
    y += 1;
    if (isalpha(s[x][y]) || vis[x][y]) continue;
    if (y >= n) return true;
    for (int i = -1; i <= 1; i++) {
      int nx = x + i;
      if (nx < 1 || nx > 3) continue;
      if (isalpha(s[nx][y]) || isalpha(s[nx][y + 1]) || isalpha(s[nx][y + 2]) ||
          vis[nx][y + 2])
        continue;
      int ny = y + 2;
      if (ny >= n) return true;
      vis[nx][ny] = 1;
      q.push(make_pair(nx, ny));
    }
  }
  return false;
}
int main() {
  scanf("%d", &t);
  while (t--) {
    memset(vis, 0, sizeof(vis));
    scanf("%d%d", &n, &k);
    for (int i = 1; i <= 3; i++) {
      scanf("%s", s[i] + 1);
      if (s[i][1] == 's') so = i;
    }
    printf(bfs(so) ? "YES\n" : "NO\n");
  }
}
