#include <bits/stdc++.h>
using namespace std;
const int INF = 1000001000;
const long long INFL = 2000000000000001000;
int solve();
int main() {
  srand(2317);
  cout.precision(10);
  cout.setf(ios::fixed);
  int tn = 1;
  cin >> tn;
  for (int i = 0; i < tn; ++i) solve();
}
const int maxn = 1005;
char s[3][maxn];
bool d[maxn][3];
bool can(int i, int j, int nj) {
  int ri = i * 3;
  assert(s[j][ri] == '.');
  if (s[j][ri + 1] != '.') return false;
  if (s[nj][ri + 1] != '.') return false;
  if (s[nj][ri + 2] != '.' || s[nj][ri + 3] != '.') return false;
  return true;
}
int solve() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < int(3); ++i) {
    fill(s[i], s[i] + maxn, '.');
    for (int j = 0; j < int(maxn); ++j) d[j][i] = false;
  }
  for (int i = 0; i < int(3); ++i) {
    scanf("%s", s[i]);
    s[i][n] = '.';
  }
  int pos = 0;
  while (s[pos][0] != 's') ++pos;
  s[pos][0] = '.';
  d[0][pos] = true;
  for (int i = 0; i < int(n - 1); ++i)
    for (int j = 0; j < int(3); ++j) {
      if (!d[i][j]) continue;
      for (int dj = int(-1); dj < int(2); ++dj) {
        if (j + dj < 0 || j + dj >= 3) continue;
        if (!can(i, j, j + dj)) continue;
        d[i + 1][j + dj] = true;
      }
    }
  if (d[n - 1][0] || d[n - 1][1] || d[n - 1][2])
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
