#include <bits/stdc++.h>
using namespace std;
priority_queue<int, vector<int>, greater<int> > pq;
int t, n, k, r, c, reached;
char bord[3][102];
bool vis[3][102];
void dfs(int r, int c) {
  vis[r][c] = true;
  if (c == n - 1) reached = 1;
  if (reached == 1) return;
  int s, e;
  if (r == 0) s = 0, e = 1;
  if (r == 1) s = 0, e = 2;
  if (r == 2) s = 1, e = 2;
  if (bord[r][c + 1] != '.') return;
  for (int i = s; i <= e; i++) {
    if (bord[i][c + 1] == '.') {
      if (c + 1 == n - 1 || (bord[i][c + 2] == '.' && c + 2 == n - 1) ||
          (bord[i][c + 3] == '.' && c + 3 == n - 2)) {
        reached = 1;
        return;
      }
      if (c + 3 < n && bord[i][c + 1 + 1] == '.' && bord[i][c + 1 + 2] == '.' &&
          !vis[i][c + 1 + 2])
        dfs(i, c + 1 + 2);
    }
  }
}
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> k;
    for (int i = 0; i < 3; i++) scanf("%s", bord[i]);
    for (int i = 0; i < 3; i++) {
      if (bord[i][0] == 's') {
        r = i;
        break;
      }
    }
    dfs(r, c);
    if (reached == 1)
      cout << "YES";
    else
      cout << "NO";
    reached = 0;
    memset(vis, false, sizeof(vis));
    cout << "\n";
  }
  return 0;
}
