#include <bits/stdc++.h>
using namespace std;
ifstream fin(".in");
ofstream fout(".out");
long long int first, second, a, b, i, m, n, j, l, c, d, ls, ld, maxi,
    mini = 1000000000, ok, k, t, v[5][200], nr[100], poz[5], pp[5];
char z[10000];
map<int, int> mm;
bool cmp(char a, char b) {
  if (a > b) return 1;
  return 0;
}
queue<pair<int, int> > q;
pair<int, int> start, nxt, tren[100];
long long int inm(int first, int p) {
  a = 1;
  b = first;
  for (int i = 1; i <= p; i <<= 1) {
    if (i & p) {
      a = a * b % 1000000007;
    }
    b = b * b % 1000000007;
  }
  return a;
}
int prim(int first) {
  if (first == 2) return 1;
  if (first < 3 || first % 2 == 0) return 0;
  for (int i = 3; i * i <= first; i += 2)
    if (first % i == 0) return 0;
  return 1;
}
int divi(int a, int b) {
  int r = a % b;
  while (r) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int main() {
  cin >> t;
  while (t) {
    t--;
    cin >> n >> k;
    for (i = 1; i <= 3; i++)
      for (j = 1; j <= 100; j++) v[i][j] = 0;
    for (i = 1; i <= 3; i++) {
      cin >> z;
      for (j = 1; j <= n; j++) {
        if (z[j - 1] == 's')
          v[i][j] = 2, a = j;
        else if (z[j - 1] != '.') {
          v[i][j] = 1;
        }
      }
    }
    while (a <= n) {
      if (v[1][a] == 2 && v[1][a + 1] != 1) {
        if (!v[1][a + 1]) v[1][a + 1] = 2;
        if (!v[2][a + 1]) v[2][a + 1] = 2;
      }
      if (v[2][a] == 2 && v[2][a + 1] != 1) {
        if (!v[1][a + 1]) v[1][a + 1] = 2;
        if (!v[2][a + 1]) v[2][a + 1] = 2;
        if (!v[3][a + 1]) v[3][a + 1] = 2;
      }
      if (v[3][a] == 2 && v[3][a + 1] != 1) {
        if (!v[2][a + 1]) v[2][a + 1] = 2;
        if (!v[3][a + 1]) v[3][a + 1] = 2;
      }
      for (i = 1; i <= 3; i++) {
        for (j = 1; j <= n; j++) {
          if (v[i][j + 2] == 1) {
            while (v[i][j + 2] == 1) {
              v[i][j] = 1;
              j++;
            }
            v[i][j] = 0;
            j++;
            v[i][j] = 0;
          }
        }
      }
      a++;
    }
    if (v[1][n] == 2 || v[2][n] == 2 || v[3][n] == 2)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
