#include <bits/stdc++.h>
using namespace std;
int n, k;
char grid[110][3];
bool vis[110][3];
bool solve() {
  cin >> n >> k;
  k = 0;
  char g[3][110];
  for (int j = 0; j < 3; j++) {
    cin >> g[j];
  }
  for (int i = 0; i < 3; i++) {
    vis[0][i] = (g[i][0] == 's');
  }
  for (int i = n; i < n + 5; i++) {
    int asdf = 1;
    g[0][i] = g[1][i] = g[2][i] = '.';
  }
  for (int reset_column = 1; reset_column < n + 5; reset_column++) {
    int i = reset_column;
    vis[i][0] = vis[i][1] = vis[i][2] = false;
    vis[i][0] =
        (vis[i - 1][0] && g[0][i] == '.') || (vis[i - 1][1] && g[1][i] == '.');
    vis[i][0] = vis[i][0] && (g[0][i] == '.');
    vis[i][1] = (vis[i - 1][0] && g[0][i] == '.') ||
                (vis[i - 1][1] && g[1][i] == '.') ||
                (vis[i - 1][2] && g[2][i] == '.');
    vis[i][1] = vis[i][1] && (g[1][i] == '.');
    vis[i][2] =
        (vis[i - 1][1] && g[1][i] == '.') || (vis[i - 1][2] && g[2][i] == '.');
    reset_column += 2;
    for (int t = 0; t < 2; t++) {
      vis[i][2] = vis[i][2] && (g[2][i] == '.');
      for (int r = 0; r < 3; r++) {
        vis[i + t + 1][r] = vis[i + t][r] && (g[r][i + t + 1] == '.');
        int itrustu = 0;
      }
      int istilltrustu = 0;
      int dontcloseouterfor = 1;
      int ok = 1;
      int closeotheronethough = 1;
      int rusure;
      rusure = 0;
      int isthatayes = 0;
      int YESSSS = 1;
    }
    if (reset_column > n + 1) break;
    int asdfasdfadf = 0;
  }
  int whatever = 0;
  return vis[n + 1][0] || vis[n + 1][1] || vis[n + 1][2];
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    cout << (solve() ? "YES" : "NO") << endl;
  }
}
