#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int MAXN = 200050;
const int MOD = 1e9 + 7;
const int MOD1 = 1e9 + 35011;
const int MOD2 = 1e9 + 18169;
const int INF = (1 << 30);
const long long INFl = 1e18;
int t;
int n, k;
char mas[3][105];
bool CheckLine(int& posX, const int& posY) {
  for (int i = posX; i < n; ++i) {
    if (mas[posY][i] != '.' && mas[posY][i] != 's') {
      break;
    } else if (i == n - 1) {
      posX = n - 1;
      return true;
    }
  }
  for (int i = posX + 3; i < n; i += 3) {
    if (mas[posY][i] != '.' || mas[posY][i - 1] != '.' ||
        mas[posY][i - 2] != '.' ||
        (mas[posY][i - 3] != '.' && mas[posY][i - 3] != 's')) {
      return false;
    }
    for (int j = i; j < min(n, i + 4); ++j) {
      if (mas[1][j] != '.') {
        break;
      } else if (j == min(n, i + 4) - 1) {
        posX = i;
        return true;
      }
    }
  }
  return false;
}
void solve() {
  scanf("%d %d\n", &n, &k);
  int posY = 0, posX = 0;
  for (size_t i = 0; i < 3; ++i) {
    for (size_t j = 0; j < n; ++j) {
      scanf("%c", &mas[i][j]);
      if (mas[i][j] == 's') {
        posY = i;
        posX = j;
      }
    }
    int ctmp;
    scanf("%c", &ctmp);
  }
  if (posY != 1) {
    ++posX;
    if (!CheckLine(posX, posY)) {
      for (int i = posX; i < min(posX + 4, n); ++i) {
        if (mas[1][i] != '.') {
          puts("NO");
          return;
        }
      }
      if (mas[posY][posX] != '.') {
        puts("NO");
        return;
      }
      posX += 2;
      posY = 1;
    } else {
      posX += 2;
    }
    if (posX == n - 1) {
      puts("YES");
      return;
    }
  }
  while (posX < n - 1) {
    ++posX;
    if (mas[1][posX] != '.') {
      puts("NO");
      return;
    }
    for (int i = posX + 1; i < min(n, posX + 4); ++i) {
      if (mas[1][i] != '.') {
        if (!CheckLine(posX, 0)) {
          if (!CheckLine(posX, 2)) {
            puts("NO");
            return;
          }
        }
        if (posX == n - 1) {
          puts("YES");
          return;
        }
        break;
      }
    }
    posX += 2;
  }
  puts("YES");
}
int main() {
  scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}
