#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433832795l;
template <typename T>
inline auto sqr(T x) -> decltype(x * x) {
  return x * x;
}
template <typename T1, typename T2>
inline bool umx(T1& a, T2 b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
inline bool umn(T1& a, T2 b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int M = 3;
const int N = 100;
struct Input {
  char a[M][N + 1];
  int n, k;
  bool read() {
    if (!(cin >> n >> k)) {
      return 0;
    }
    for (int i = 0; i < M; ++i) {
      scanf("%s", a[i]);
    }
    return true;
  }
  void init(const Input& input) { *this = input; }
};
struct Data : Input {
  bool ans;
  void write() { cout << (ans ? "YES" : "NO") << "\n"; }
  virtual void solve() {}
  virtual void clear() { *this = Data(); }
};
struct Solution : Data {
  bool dp[M][N];
  bool isAlpha(char c) { return c >= 'A' && c <= 'Z'; }
  void solve() {
    for (int i = 0; i < M; ++i) {
      dp[i][n - 1] = true;
    }
    for (int j = n - 2; j >= 0; --j) {
      for (int i = 0; i < M; ++i) {
        bool& r = dp[i][j];
        r = false;
        auto check = [&](int i, int j, int t) -> bool {
          int cj = j + 2 * t;
          if (i < 0 || i >= M) {
            return false;
          }
          if (cj >= n) {
            return true;
          }
          return !isAlpha(a[i][cj]);
        };
        auto go = [&](int i, int j, int di) -> void {
          int ni = i + di;
          if (check(i, j + 1, j) && check(ni, j + 1, j) &&
              check(ni, j + 1, j + 1)) {
            r |= dp[ni][j + 1];
          }
        };
        go(i, j, -1);
        go(i, j, 0);
        go(i, j, 1);
      }
    }
    for (int i = 0; i < M; ++i) {
      if (a[i][0] == 's') {
        ans = dp[i][0];
      }
    }
  }
  void clear() { *this = Solution(); }
};
Solution sol;
int main() {
  cout.setf(ios::showpoint | ios::fixed);
  cout.precision(20);
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    sol.read();
    sol.solve();
    sol.write();
    sol.clear();
  }
  return 0;
}
