#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
long long max3(long long x, long long y, long long z) {
  return max(max(x, y), z);
}
long long min3(long long x, long long y, long long z) {
  return min(min(x, y), z);
}
const long long N = 1e5 + 10, M = 2e5 + 10, M2 = 1e6 + 10, mod = 1e9 + 7,
                inf = 1e17 + 10;
const long long INF = 1e9 + 7;
void add(long long& a, long long b) {
  a += b;
  if (a >= mod) {
    a -= mod;
  }
}
long long X[] = {0, 1, 0, -1};
long long Y[] = {-1, 0, 1, 0};
long long power(long long x, long long n) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % mod;
    x = ((x % mod) * (x % mod)) % mod;
    n = n / 2;
  }
  return result;
}
long long c;
string s[3];
long long dp[3][105];
bool check(long long x, long long y) {
  if (x >= 3 || x < 0 || y >= c || y < 0) return 0;
  if (s[x][y] <= 'Z' && s[x][y] >= 'A') return 0;
  return 1;
}
long long rec(long long x, long long y, bool f) {
  if (y >= c - 1) return 1;
  if (!check(x, y)) return 0;
  if (dp[x][y] != -1) return dp[x][y];
  if (check(x, y + 1) == 0) return dp[x][y] = 0;
  if (f == 0)
    return dp[x][y] =
               rec(x, y + 1, 1) || rec(x - 1, y + 1, 1) || rec(x + 1, y + 1, 1);
  else
    return dp[x][y] = rec(x, y + 2, 0);
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long x;
    cin >> c >> x;
    memset(dp, -1, sizeof(dp));
    for (long long i = 0; i < 3; i++) cin >> s[i];
    long long x1 = 0, y1 = 0;
    for (long long i = 0; i < 3; i++) {
      if (s[i][0] == 's') x1 = i, y1 = 0;
    }
    if (rec(x1, y1, 0))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
