#include <bits/stdc++.h>
using namespace std;
int field[101][3][101];
bool vis[101][3][101];
int n;
string s[3];
void init() {
  for (int i = 0; i < 101; i++)
    for (int j = 0; j < 3; j++)
      for (int k = 0; k < 101; k++) vis[i][j][k] = false;
}
void mark_train(int row, int start, int last) {
  int time = 0;
  while (last >= 0) {
    for (int i = start; i < last + 1; i++) field[time][row][i] = 1;
    last = last - 2;
    start = max(start - 2, 0);
    time++;
  }
}
void set_field() {
  for (int time = 0; time < 101; time++)
    for (int i = 0; i < 3; i++)
      for (int j = 0; j < 101; j++) field[time][i][j] = 0;
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < n; j++) {
      while (j < n && s[i][j] == '.') j++;
      int start = j;
      while (j < n && s[i][j] >= 'A' && s[i][j] <= 'Z') j++;
      int last = j - 1;
      if (start <= last) mark_train(i, start, last);
    }
}
bool dfs(int row, int col) {
  vis[col][row][col] = true;
  if (col == n - 1) return true;
  bool tans = false;
  if (field[col][row][col + 1]) return false;
  if (!vis[col + 1][row][col + 1] && !field[col + 1][row][col + 1] &&
      !field[col][row][col + 1])
    tans = tans || dfs(row, col + 1);
  if (!vis[col + 1][max(row - 1, 0)][col + 1] &&
      !field[col + 1][max(row - 1, 0)][col + 1] &&
      !field[col][max(row - 1, 0)][col + 1])
    tans = tans || dfs(max(row - 1, 0), col + 1);
  if (!vis[col + 1][min(row + 1, 2)][col + 1] &&
      !field[col + 1][min(row + 1, 2)][col + 1] &&
      !field[col][min(row + 1, 2)][col + 1])
    tans = tans || dfs(min(row + 1, 2), col + 1);
  return tans;
}
int main() {
  ios_base::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    int m;
    cin >> n >> m;
    s[0].reserve(n);
    s[1].reserve(n);
    s[2].reserve(n);
    cin >> s[0] >> s[1] >> s[2];
    init();
    set_field();
    bool flag;
    if (s[0][0] == 's')
      flag = dfs(0, 0);
    else if (s[1][0] == 's')
      flag = dfs(1, 0);
    else
      flag = dfs(2, 0);
    if (flag)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
