#include <bits/stdc++.h>
using namespace std;
using lli = long long;
using lld = long double;
using ulli = unsigned long long int;
using pll = pair<lli, lli>;
using ttt = pair<lli, pll>;
using vttt = vector<ttt>;
using vll = vector<pll>;
using vl = vector<lli>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using cd = complex<lld>;
const double PI = acos(-1);
string row[3];
int n;
int dp[3][110];
bool process(int x, int y) {
  if (y >= n) return 1;
  if (dp[x][y] != -1) return dp[x][y];
  int& ans = dp[x][y];
  ans = 0;
  if (x > 0 && row[x][y + 1] == '.' && row[x - 1][y + 1] == '.' &&
      row[x - 1][y + 2] == '.' && row[x - 1][y + 3] == '.')
    ans |= process(x - 1, y + 3);
  if (x < 2 && row[x][y + 1] == '.' && row[x + 1][y + 1] == '.' &&
      row[x + 1][y + 2] == '.' && row[x + 1][y + 3] == '.')
    ans |= process(x + 1, y + 3);
  if (row[x][y + 1] == '.' && row[x][y + 2] == '.' && row[x][y + 3] == '.')
    ans |= process(x, y + 3);
  {}
  return dp[x][y];
}
int tejas_919(int kkkk) {
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < 110; j++) dp[i][j] = -1;
  lli m, k, q, u, v, temp = 0;
  bool ans = 0;
  cin >> n >> k;
  for (int i = 0; i < 3; i++) {
    cin >> row[i];
    row[i] += ".....";
  }
  for (int i = 0; i < 3; i++)
    if (row[i][0] == 's') {
      ans = process(i, 0);
    }
  if (ans)
    cout << "YES" << '\n';
  else
    cout << "NO" << '\n';
  return 0;
}
signed main() {
  if (!0) {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
  }
  cout << fixed << setprecision(10);
  int t = 1;
  cin >> t;
  for (int i = 0; i < t; i++) {
    tejas_919(i + 1);
  }
  {};
}
