#include <bits/stdc++.h>
using namespace std;
inline void read_string_to_vector(vector<string> &vec) {
  string str;
  getline(cin, str);
  vec.push_back(str);
}
template <typename T>
inline void read_digit_to_vector(vector<T> &vec) {
  T t;
  cin >> t;
  vec.push_back(t);
}
long long n, k;
bool dp[3][101][101];
char mas[3][101];
int main() {
  ios::sync_with_stdio(false);
  long long t;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    for (register long long i = 0; i < 3; ++i) cin >> mas[i];
    long long ki, kj;
    for (register long long j = n - 1; j >= 0; --j)
      for (register long long i = 0; i < 3; ++i)
        for (register long long k = 0; k < n; ++k) {
          bool mk = true;
          if ((j + (k << 1)) < n)
            mk = (mas[i][j + 2 * k] == '.' || mas[i][j + 2 * k] == 's');
          if (mas[i][j] == 's') {
            ki = i;
            kj = j;
          }
          dp[i][j][k] = false;
          if (j == n - 1)
            dp[i][j][k] = mk;
          else {
            bool mkl = true;
            if ((j + 1 + (k << 1)) < n) {
              mkl = (mas[i][j + 1 + (k << 1)] == '.' ||
                     mas[i][j + 1 + (k << 1)] == 's');
              if (j + 1 < n && mk && mkl)
                dp[i][j][k] = dp[i][j][k] || dp[i][j + 1][k + 1];
              if (j + 1 < n && i + 1 < 3 && mk && mkl &&
                  (mas[i + 1][j + 1 + (k << 1)] == '.' ||
                   mas[i + 1][j + 1 + (k << 1)] == 's'))
                dp[i][j][k] = dp[i][j][k] || dp[i + 1][j + 1][k + 1];
              if (j + 1 < n && i - 1 >= 0 && mk && mkl &&
                  (mas[i - 1][j + 1 + (k << 1)] == '.' ||
                   mas[i - 1][j + 1 + (k << 1)] == 's'))
                dp[i][j][k] = dp[i][j][k] || dp[i - 1][j + 1][k + 1];
            } else {
              if (j + 1 < n && mk)
                dp[i][j][k] = dp[i][j][k] || dp[i][j + 1][k + 1];
              if (j + 1 < n && i + 1 < 3 && mk)
                dp[i][j][k] = dp[i][j][k] || dp[i + 1][j + 1][k + 1];
              if (j + 1 < n && i - 1 >= 0 && mk)
                dp[i][j][k] = dp[i][j][k] || dp[i - 1][j + 1][k + 1];
            }
          }
        }
    if (dp[ki][kj][0])
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
