#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &x) {
  char c;
  bool nega = 0;
  while ((!isdigit(c = getchar())) && (c != '-'))
    ;
  if (c == '-') {
    nega = 1;
    c = getchar();
  }
  x = c - 48;
  while (isdigit(c = getchar())) x = x * 10 + c - 48;
  if (nega) x = -x;
}
template <typename T>
inline void writep(T x) {
  if (x > 9) writep(x / 10);
  putchar(x % 10 + 48);
}
template <typename T>
inline void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  writep(x);
}
template <typename T>
inline void writeln(T x) {
  write(x);
  putchar('\n');
}
int t, n, k;
string s[5];
bool f[5][101];
struct train {
  int i, j;
  train(int i, int j) {
    this->i = i;
    this->j = j;
  }
  train() { i = j = 0; }
} T[5][26];
int cnt[5];
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> k;
    for (int i = 1; i <= 3; i++) cin >> s[i];
    for (int i = 1; i <= 3; i++) f[i][0] = cnt[i] = 0;
    for (int i = 1; i <= 3; i++) {
      if (s[i][0] == 's') {
        f[i][0] = 1;
        if (n > 1 && isalpha(s[i][1])) f[i][0] = 0;
        s[i][0] = '.';
        break;
      }
    }
    for (int r = 1; r <= 3; r++) {
      for (int i = 0; i <= n - 1; i++) {
        if (s[r][i] != '.') {
          int j = i;
          while (j + 1 < n && s[r][j + 1] == s[r][i]) j++;
          for (int k = i; k <= j; k++) s[r][k] = '.';
          cnt[r]++;
          T[r][cnt[r]] = train(i, j);
        }
      }
    }
    for (int i = 1; i <= n - 1; i++) {
      for (int r = 1; r <= 3; r++) {
        for (int k = 1; k <= cnt[r]; k++) {
          train t(T[r][k].i - 2 * i, T[r][k].j - 2 * i + 2);
          if (t.i <= i + 1 && i <= t.j) {
            f[r][i] = 0;
            goto line1;
          }
        }
        f[r][i] = (f[r - 1][i - 1] || f[r][i - 1] || f[r + 1][i - 1]);
      line1:;
      }
    }
    if (f[1][n - 1] || f[2][n - 1] || f[3][n - 1])
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
