#include <bits/stdc++.h>
using namespace std;
const int N = 200;
int DP[N][N];
string s[N];
int n, k;
int check(int x, int y) {
  if (x <= 0) return 0;
  return (s[x][y] == '.' and s[x][y + 1] == '.' and s[x][y + 2] == '.');
}
int dfs(int x, int y) {
  if (y >= n) {
    return 1;
  }
  int &ret = DP[x][y];
  if (ret >= 0) return ret;
  ret = 0;
  if (s[x][y + 1] == '.' and check(x + 1, y + 1)) ret |= dfs(x + 1, y + 3);
  if (s[x][y + 1] == '.' and check(x - 1, y + 1)) ret |= dfs(x - 1, y + 3);
  if (s[x][y + 1] == '.' and check(x, y + 1)) ret |= dfs(x, y + 3);
  return ret;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    for (int i = 0; i < N; i++)
      for (int j = 0; j < N; j++) DP[i][j] = -1;
    cin >> n >> k;
    int ans = 0;
    for (int i = 1; i <= 3; i++) {
      cin >> s[i];
      s[i] = s[i] + "........";
    }
    for (int i = 1; i <= 3; i++) {
      for (int j = 0; j < n; j++) {
        if (s[i][j] == 's') {
          ans = dfs(i, j);
        }
      }
    }
    if (ans) {
      cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
}
