#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
char B[3][109];
int vis[3][109][309];
int xs, ys;
struct node {
  int x, y, ti;
  node() { x = y = ti = 0; }
  node(int a, int b, int c) { x = a, y = b, ti = c; }
};
int n;
bool BFS() {
  queue<node> q;
  q.push(node(xs, ys, 0));
  while (!q.empty()) {
    node cur = q.front();
    q.pop();
    if (cur.y >= (n - 1)) return 1;
    if ((B[cur.x][cur.y + 1] == '.' || B[cur.x][cur.y + 1] == 0) &&
        (B[cur.x][cur.y + 2] == '.' || B[cur.x][cur.y + 2] == 0) &&
        (B[cur.x][cur.y + 3] == '.' || B[cur.x][cur.y + 3] == 0) &&
        !vis[cur.x][cur.y + 3][cur.ti + 2]) {
      vis[cur.x][cur.y + 3][cur.ti + 2] = 1;
      q.push(node(cur.x, cur.y + 3, cur.ti + 2));
    }
    if (cur.x) {
      if ((B[cur.x][cur.y + 1] == '.' || B[cur.x][cur.y + 1] == 0) &&
          (B[cur.x - 1][cur.y + 3] == '.' || B[cur.x - 1][cur.y + 3] == 0) &&
          (B[cur.x - 1][cur.y + 1] == '.' || B[cur.x - 1][cur.y + 1] == 0) &&
          (B[cur.x - 1][cur.y + 2] == '.' || B[cur.x - 1][cur.y + 2] == 0) &&
          !vis[cur.x - 1][cur.y + 3][cur.ti + 2]) {
        vis[cur.x - 1][cur.y + 3][cur.ti + 2] = 1;
        q.push(node(cur.x - 1, cur.y + 3, cur.ti + 2));
      }
    }
    if (cur.x < 2) {
      if ((B[cur.x][cur.y + 1] == '.' || B[cur.x][cur.y + 1] == 0) &&
          (B[cur.x + 1][cur.y + 3] == '.' || B[cur.x + 1][cur.y + 3] == 0) &&
          (B[cur.x + 1][cur.y + 1] == '.' || B[cur.x + 1][cur.y + 1] == 0) &&
          (B[cur.x + 1][cur.y + 2] == '.' || B[cur.x + 1][cur.y + 2] == 0) &&
          !vis[cur.x + 1][cur.y + 3][cur.ti + 2]) {
        vis[cur.x + 1][cur.y + 3][cur.ti + 2] = 1;
        q.push(node(cur.x + 1, cur.y + 3, cur.ti + 2));
      }
    }
  }
  return 0;
}
int main(int argc, char** argv) {
  int t, k;
  cin >> t;
  while (t--) {
    memset(B, 0, sizeof B);
    memset(vis, 0, sizeof vis);
    cin >> n >> k;
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < n; j++) {
        cin >> B[i][j];
        if (B[i][j] == 's') xs = i, ys = j;
      }
    }
    if (BFS())
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
