#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
const int INF = 0x3f3f3f3f;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
long long powmod(long long a, long long b, long long MOD) {
  long long ans = 1;
  while (b) {
    if (b % 2) ans = ans * a % MOD;
    a = a * a % MOD;
    b /= 2;
  }
  return ans;
}
class node {
 public:
  int x, y;
  node(int x, int y) : x(x), y(y) {}
};
char Map[3][105];
bool vis[3][105];
bool flag = 0;
int n, x, y;
int Next[3] = {-1, 0, 1};
queue<node> q, q1;
void bfs() {
  q = q1;
  q.push(node(x, y));
  vis[x][y] = 1;
  while (!q.empty()) {
    node temp = q.front();
    q.pop();
    for (int i = 0; i < 3; i++) {
      int xx = temp.x + Next[i];
      int yy = temp.y + 3;
      if (xx < 0 || xx > 2) continue;
      if (Map[temp.x][temp.y + 1] != '.') continue;
      if (Map[xx][temp.y + 1] != '.') continue;
      if (temp.y + 2 < n && Map[xx][temp.y + 2] != '.') continue;
      if (temp.y + 3 < n && Map[xx][temp.y + 3] != '.') continue;
      if (temp.y + 3 < n && vis[xx][temp.y + 3] == 1) continue;
      if (temp.y + 3 >= n - 1) {
        flag = 1;
        return;
      }
      vis[xx][yy] = 1;
      q.push(node(xx, yy));
    }
  }
  return;
}
int main() {
  int a;
  cin >> a;
  while (a--) {
    flag = 0;
    memset(vis, 0, sizeof(vis));
    int k;
    scanf("%d%d", &n, &k);
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < n; j++) {
        cin >> Map[i][j];
        if (Map[i][j] == 's') {
          x = i;
          y = j;
        }
      }
    }
    bfs();
    if (flag)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
