#include <bits/stdc++.h>
using namespace std;
bool dp[3][105];
char A[3][105];
int main() {
  int t, n, k, i, j, diff;
  cin >> t;
  while (t--) {
    memset(dp, false, sizeof dp);
    cin >> n >> k;
    for (i = 0; i < 3; i++) scanf("%s", A[i]);
    diff = 0;
    if (A[0][0] == 's')
      dp[0][0] = true;
    else if (A[1][0] == 's')
      dp[1][0] = true;
    else
      dp[2][0] = true;
    for (j = 1; j < n; j++) {
      if (j + diff < n) {
        if (A[0][j + diff] == '.' &&
            (dp[0][j - 1] || (dp[1][j - 1] && A[1][j + diff] == '.')))
          dp[0][j] = true;
        if (A[1][j + diff] == '.' &&
            (dp[1][j - 1] || (dp[0][j - 1] && A[0][j + diff] == '.') ||
             (dp[2][j - 1] && A[2][j + diff] == '.')))
          dp[1][j] = true;
        if (A[2][j + diff] == '.' &&
            (dp[2][j - 1] || (dp[1][j - 1] && A[1][j + diff] == '.')))
          dp[2][j] = true;
      } else {
        if (dp[0][j - 1]) dp[0][j] = dp[1][j] = true;
        if (dp[1][j - 1]) dp[0][j] = dp[1][j] = dp[2][j] = true;
        if (dp[2][j - 1]) dp[1][j] = dp[2][j] = true;
      }
      if (j + diff + 1 < n)
        for (i = 0; i < 3; i++)
          dp[i][j] = dp[i][j] && (A[i][j + diff + 1] == '.');
      if (j + diff + 2 < n)
        for (i = 0; i < 3; i++)
          dp[i][j] = dp[i][j] && (A[i][j + diff + 2] == '.');
      diff += 2;
    }
    if (dp[0][n - 1] || dp[1][n - 1] || dp[2][n - 1])
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
