#include <bits/stdc++.h>
using namespace std;
int dx[3] = {-1, 1, 0};
int dy[3] = {1, 1, 1};
int d[5][205];
char mp[5][205];
int n, k, flag;
int bfs(int sx, int sy) {
  queue<pair<int, int> > que;
  memset(d, 0, sizeof(d));
  while (!que.empty()) que.pop();
  que.push(pair<int, int>(sx, sy));
  d[sx][sy] = 1;
  while (que.size()) {
    pair<int, int> tmp = que.front();
    que.pop();
    if (tmp.second >= n) {
      return 1;
    }
    if (mp[tmp.first][tmp.second + 1] != '.') continue;
    if (tmp.first < 0 || tmp.first > 2) continue;
    for (int i = 0; i < 3; i++) {
      int nx = tmp.first + dx[i];
      int ny = tmp.second + dy[i];
      if (mp[nx][ny] == '.' && mp[nx][ny + 1] == '.' && mp[nx][ny + 2] == '.') {
        if (d[nx][ny + 2] == 0) {
          d[nx][ny + 2] = 1;
          que.push(pair<int, int>(nx, ny + 2));
        }
      }
    }
  }
  return 0;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    memset(d, 0, sizeof(d));
    cin >> n >> k;
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < n; j++) {
        cin >> mp[i][j];
      }
      mp[i][n] = mp[i][n + 1] = mp[i][n + 2] = mp[i][n + 3] = mp[i][n + 4] =
          mp[i][n + 5] = mp[i][n + 6] = mp[i][n + 7] = '.';
    }
    flag = 0;
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < n; j++) {
        if (mp[i][j] == 's') {
          flag = bfs(i, j);
        }
      }
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
