#include <bits/stdc++.h>
using namespace std;
int n, k;
int x, y;
char s[3][210];
bool vis[3][210];
int step[3] = {-1, 0, 1};
struct node {
  int x;
  int y;
} head, tail;
bool bfs() {
  queue<node> q;
  head.x = x;
  head.y = y;
  vis[x][y] = 1;
  q.push(head);
  while (!q.empty()) {
    head = q.front();
    q.pop();
    if (head.y >= n - 1) return true;
    if (s[head.x][head.y + 1] == '.') {
      for (int i = 0; i < 3; i++) {
        tail.x = head.x + step[i];
        tail.y = head.y + 1;
        if (tail.x >= 0 && tail.x < 3) {
          if (s[tail.x][tail.y] == '.' && s[tail.x][tail.y + 1] == '.' &&
              s[tail.x][tail.y + 2] == '.' && !vis[tail.x][tail.y + 2]) {
            vis[tail.x][tail.y + 2] = 1;
            tail.y += 2;
            q.push(tail);
          }
        }
      }
    }
  }
  return false;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    for (int i = 0; i < 3; i++) {
      cin >> s[i];
      for (int j = 0; j < n; j++) {
        if (s[i][j] == 's') x = i, y = j;
      }
      for (int j = n; j < n * 2; j++) s[i][j] = '.';
    }
    memset(vis, 0, sizeof(vis));
    cout << (bfs() ? "YES" : "NO") << endl;
  }
  return 0;
}
