#include <bits/stdc++.h>
using namespace std;
bool dp[120][5];
int diry[3] = {-1, 0, 1};
int main() {
  int t, n, k;
  string s[3];
  deque<char> fuck[3];
  int px, py;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    for (int i = 0; i < 3; i++) {
      cin >> s[i];
      if (s[i][0] == 's') py = i;
      for (int j = 0; j < n; j++) {
        fuck[i].push_back(s[i][j]);
      }
    }
    px = 0;
    memset(dp, 0, sizeof(dp));
    dp[px][py] = true;
    int tx, ty;
    for (int x = 1; x < n; x++) {
      for (int y = 0; y < 3; y++) {
        for (int k = 0; k < 3; k++) {
          ty = y + diry[k];
          if (ty >= 0 && ty < 3 && fuck[y][x] == '.' && fuck[ty][x] == '.') {
            dp[x][y] |= dp[x - 1][ty];
          }
        }
      }
      for (int i = 0; i < 3; i++) {
        if (fuck[i][x] != '.') {
          dp[x][i] = false;
        }
        fuck[i].pop_front();
        fuck[i].push_back('.');
        if (fuck[i][x] != '.') {
          dp[x][i] = false;
        }
        fuck[i].pop_front();
        fuck[i].push_back('.');
        if (fuck[i][x] != '.') {
          dp[x][i] = false;
        }
      }
    }
    bool res = false;
    for (int i = 0; i < 3; i++) res |= dp[n - 1][i];
    if (res)
      printf("YES\n");
    else
      printf("NO\n");
    for (int i = 0; i < 3; i++) {
      while (!fuck[i].empty()) fuck[i].pop_front();
    }
  }
}
