#include <bits/stdc++.h>
int n = 0, k = 0;
int dat[3][103];
int _dfs(int x, int y, int x1, int y1) {
  if (y >= y1) return 1;
  dat[x][y] = 1;
  if (dat[x][y + 1] == 1) return 0;
  if (dat[x + 1][y + 1] == 0 && x + 1 < 3 && dat[x + 1][y + 2] == 0 &&
      dat[x + 1][y + 3] == 0) {
    if (_dfs(x + 1, y + 3, x1, y1)) return 1;
  }
  if (dat[x - 1][y + 1] == 0 && x - 1 >= 0 && dat[x - 1][y + 2] == 0 &&
      dat[x - 1][y + 3] == 0) {
    if (_dfs(x - 1, y + 3, x1, y1)) return 1;
  }
  if (dat[x][y + 1] == 0 && dat[x][y + 2] == 0 && dat[x][y + 3] == 0) {
    if (_dfs(x, y + 3, x1, y1)) return 1;
  }
  return 0;
}
int main() {
  int cas = 0;
  scanf("%d", &cas);
  while (cas) {
    memset(dat, 0, sizeof(dat));
    n = 0, k = 0;
    int mari = 0, marj = 0;
    scanf("%d%d", &n, &k);
    char c = '0';
    for (int i = 0; i < 3; i++) {
      scanf("%c", &c);
      for (int j = 0; j < n; j++) {
        scanf("%c", &c);
        if (c == '.')
          dat[i][j] = 0;
        else if (c == 's') {
          mari = i;
          marj = j;
          dat[i][j] = 0;
        } else
          dat[i][j] = 1;
      }
    }
    int cou = 0;
    for (int i = 0; i < 3; i++) {
      if (dat[i][n - 1] == 0) {
        if (_dfs(mari, marj, i, n - 1)) {
          cou = 1;
          break;
        }
      }
    }
    if (cou)
      printf("YES\n");
    else
      printf("NO\n");
    cas--;
  }
  return 0;
}
