#include <bits/stdc++.h>
using namespace std;
char ss[6][210];
int a[6][210];
int f[6][210];
int main() {
  int ca;
  scanf("%d", &ca);
  while (ca--) {
    int n, nk, sta;
    memset(f, 0, sizeof(f));
    scanf("%d%d", &n, &nk);
    memset(a, 1, sizeof(a));
    for (int y = 1; y <= 3; y++) {
      scanf("%s", ss[y] + 1);
      for (int x = 1; x <= n; x++)
        if (ss[y][x] == 's')
          sta = y;
        else if (ss[y][x] == '.')
          a[y][x] = 0;
        else
          a[y][x] = 1;
      for (int x = n + 1; x <= 200; x++) a[y][x] = 0;
    }
    int pan = 0;
    f[sta][1] = 1;
    for (int x = 1; x <= n + 6; x += 3) {
      for (int y = 1; y <= 3; y++)
        if (f[y][x])
          if (!a[y][x + 1]) {
            if (x > n) {
              pan = 1;
              break;
            }
            if (!a[y][x + 1] && !a[y][x + 2] && !a[y][x + 3]) f[y][x + 3] = 1;
            if (!a[y - 1][x + 1] && !a[y - 1][x + 2] && !a[y - 1][x + 3])
              f[y - 1][x + 3] = 1;
            if (!a[y + 1][x + 1] && !a[y + 1][x + 2] && !a[y + 1][x + 3])
              f[y + 1][x + 3] = 1;
          }
    }
    if (pan) {
      cout << "YES\n";
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
