#include <bits/stdc++.h>
using namespace std;
long long dp[3][111];
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    string a[3];
    for (__typeof(3) i = 0; i < 3; i++) {
      cin >> a[i];
      a[i] += "...";
      long long sz = a[0].size();
      for (__typeof(sz) j = 0; j < sz; j++) {
        if (a[i][j] == 's')
          dp[i][j] = 1;
        else
          dp[i][j] = 0;
      }
    }
    long long sz = a[0].size();
    for (__typeof(sz) j = 0; j < sz; j++) {
      for (__typeof(3) i = 0; i < 3; i++) {
        if (dp[i][j] != 1) continue;
        if (j + 3 >= sz) continue;
        if ((a[i][j + 1] == '.') && (a[i][j + 2] == '.') &&
            (a[i][j + 3] == '.')) {
          dp[i][j + 3] = 1;
        }
        if ((i - 1 >= 0) && (a[i][j + 1] == '.') && (a[i - 1][j + 1] == '.') &&
            (a[i - 1][j + 2] == '.') && (a[i - 1][j + 3] == '.')) {
          dp[i - 1][j + 3] = 1;
        }
        if ((i + 1 < 3) && (a[i][j + 1] == '.') && (a[i + 1][j + 1] == '.') &&
            (a[i + 1][j + 2] == '.') && (a[i + 1][j + 3] == '.')) {
          dp[i + 1][j + 3] = 1;
        }
      }
    }
    bool ok = false;
    for (__typeof(3) i = 0; i < 3; i++) {
      for (__typeof(sz) j = sz - 3; j < sz; j++) {
        if (dp[i][j]) ok = true;
      }
    }
    if (ok)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
