#include <bits/stdc++.h>
using namespace std;
const int R = 3;
bool sequenceExists(int r, int c, const vector<string> &board, const int N,
                    const int K, vector<vector<int>> &memo) {
  if (memo[r][c] != 0) return memo[r][c] == 1 ? true : false;
  if (c >= 3 &&
      (board[r][c - 2] != '.' || board[r][c - 1] != '.' || board[r][c] != '.'))
    return false;
  if (c >= N - 1) return true;
  if (board[r][c + 1] != '.') return false;
  bool up = r > 0 ? sequenceExists(r - 1, c + 3, board, N, K, memo) : false;
  bool straight = sequenceExists(r, c + 3, board, N, K, memo);
  bool down =
      r < R - 1 ? sequenceExists(r + 1, c + 3, board, N, K, memo) : false;
  memo[r][c] = up || straight || down ? 1 : -1;
  return up || straight || down;
}
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int T;
  cin >> T;
  for (int t = 0; t < T; ++t) {
    int N, K;
    cin >> N >> K;
    vector<string> board;
    vector<vector<int>> memo(R, vector<int>(N + 5, 0));
    int startC = 0;
    int startR = -1;
    for (int r = 0; r < R; ++r) {
      string row;
      cin >> row;
      row += "........";
      if (row.front() == 's') startR = r;
      board.push_back(row);
    }
    if (sequenceExists(startR, startC, board, N, K, memo)) {
      cout << "YES" << '\n';
    } else {
      cout << "NO" << '\n';
    }
  }
  cout << flush;
  return 0;
}
