#include <bits/stdc++.h>
using namespace std;
vector<int> save;
char arr[3][101];
int n;
bool check(int i, int j) {
  return arr[i][j] != '.' || j == n - 1 || i >= 3 || j >= n || i < 0;
}
bool ret(int i, int j) {
  if (arr[i][j] != '.') return false;
  if (j >= n - 1) return true;
  if (i >= 3 || i < 0) return false;
}
bool AI(int i, int j) {
  for (int k = 1; k <= 4; ++k)
    if (arr[0][j + k] == arr[1][j + k] && arr[1][j + k] == arr[2][j + k] &&
        arr[2][j + k] == '.')
      ;
    else
      return false;
  return true;
}
int dp[102][102];
bool solve(int i, int j) {
  if (dp[i][j] != -1) return dp[i][j];
  if (arr[i][j] != 's') {
    if (check(i, j)) return ret(i, j);
    j += 2;
    if (check(i, j)) return ret(i, j);
  }
  j++;
  if (check(i, j)) return ret(i, j);
  return dp[i][j] = solve(i + 1, j) | solve(i - 1, j) | solve(i, j);
}
int main() {
  int k, t;
  cin >> t;
  for (int T = 0; T < t; ++T) {
    cin >> n >> k;
    memset(dp, -1, sizeof dp);
    memset(arr, '.', sizeof arr);
    pair<int, int> start;
    for (int i = 0; i < 3; ++i)
      for (int j = 0; j < n; ++j) {
        cin >> arr[i][j];
        if (arr[i][j] == 's') {
          start = make_pair(i, j);
        }
      }
    bool out = solve(start.first, start.second);
    if (out)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
