#include <bits/stdc++.h>
using namespace std;
const int mx = 101;
bool a[mx][mx], b[mx][mx];
int mark;
int n, k;
void dfs(int i, int j, int d) {
  if (b[i][j]) return;
  b[i][j] = 1;
  if (j + 2 * d > n) mark = 1;
  if (mark) return;
  if (a[i][j + 2 * d] || a[i][j + 2 * d - 1]) return;
  if (!a[i][j + 2 * d + 1]) {
    if (i + 1 < 4 && !a[i + 1][j + 2 * d + 1]) dfs(i + 1, j + 1, d + 1);
    if (i - 1 > 0 && !a[i - 1][j + 2 * d + 1]) dfs(i - 1, j + 1, d + 1);
    dfs(i, j + 1, d + 1);
  }
}
int main() {
  int t, j1, l1;
  cin >> t;
  char x;
  for (int i = 1; i <= t; i++) {
    cin >> n >> k;
    int j, l;
    for (j = 1; j <= 3; j++)
      for (l = 1; l <= n; l++) {
        cin >> x;
        if (x != 's' && x != '.') a[j][l] = 1;
        if (x == 's') j1 = j, l1 = l;
      }
    mark = 0;
    dfs(j1, l1, 0);
    memset(a, 0, sizeof a);
    memset(b, 0, sizeof b);
    if (mark == 1)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
}
