#include <bits/stdc++.h>
using namespace std;
char a[4][205];
int f[205][4][205], g[205][4][205];
int Test, n, m, i, T, t, j, ans, L, R;
void Cover(int t, int x, int L, int R) {
  L = max(L, 1);
  R = max(R, 1);
  for (int i = L; i <= R; i++) g[t][x][i] = T;
}
int ok(int t, int i, int j) { return g[t][i][j] != T; }
int main() {
  scanf("%d", &Test);
  for (T = 1; T <= Test; T++) {
    scanf("%d%d", &n, &m);
    for (i = 1; i <= 3; i++)
      for (scanf("%s", a[i] + 1), j = 1; j <= n; j++)
        if (a[i][j] != '.') {
          for (L = j++; j <= n && a[i][j] == a[i][j - 1]; j++)
            ;
          for (t = 0, R = --j; 2 * t <= R; t++)
            Cover(t, i, L - 2 * t, R - 2 * t);
        }
    f[0][1][1] = T * (a[1][1] == 's');
    f[0][2][1] = T * (a[2][1] == 's');
    f[0][3][1] = T * (a[3][1] == 's');
    for (t = 0; t + 1 < n; t++)
      for (i = 1; i <= 3; i++)
        for (j = 1; j <= n; j++)
          if (f[t][i][j] == T && ok(t, i, j + 1)) {
            if (i > 1 && ok(t, i - 1, j + 1) && ok(t + 1, i - 1, j + 1))
              f[t + 1][i - 1][j + 1] = T;
            if (ok(t + 1, i, j + 1)) f[t + 1][i][j + 1] = T;
            if (i < 3 && ok(t, i + 1, j + 1) && ok(t + 1, i + 1, j + 1))
              f[t + 1][i + 1][j + 1] = T;
          }
    ans = f[t][1][n] == T || f[t][2][n] == T || f[t][3][n] == T;
    puts(ans ? "YES" : "NO");
  }
}
