#include <bits/stdc++.h>
using namespace std;
int n, m, javab;
bool mark[4][200];
string s[4];
void dfs(int x, int y) {
  if (javab) return;
  if (y >= n - 1) {
    javab = 1;
    return;
  }
  if (mark[x][y] != false || s[x][y + 1] != '.') return;
  mark[x][y] = true;
  if (s[x][y + 1] == '.' && s[x][y + 2] == '.' && s[x][y + 3]) dfs(x, y + 3);
  if (x >= 2 && s[x - 1][y + 1] == '.' && s[x - 1][y + 2] == '.' &&
      s[x - 1][y + 3] == '.')
    dfs(x - 1, y + 3);
  if (x <= 2 && s[x + 1][y + 1] == '.' && s[x + 1][y + 2] == '.' &&
      s[x + 1][y + 3] == '.')
    dfs(x + 1, y + 3);
}
int main() {
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    cin >> n >> m;
    int x;
    for (int i = 1; i <= 3; i++) {
      cin >> s[i];
      if (s[i][0] == 's') x = i;
      s[1] += "...";
      s[2] += "...";
      s[3] += "...";
    }
    memset(mark, false, sizeof mark);
    javab = 0;
    dfs(x, 0);
    if (javab)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
