#include <bits/stdc++.h>
using namespace std;
int len, m;
string x[4];
int vis[4][200];
void fin() {
  int pos;
  if (x[1][0] == 's')
    pos = 1;
  else if (x[2][0] == 's')
    pos = 2;
  else
    pos = 3;
  if (x[pos][1] != '.') {
    printf("NO\n");
    return;
  }
  queue<pair<int, int> > Q;
  Q.push(make_pair(pos, 1));
  vis[pos][1] = 1;
  if (pos + 1 <= 3 && x[pos + 1][1] == '.')
    Q.push(make_pair(pos + 1, 1)), vis[pos + 1][1] = 1;
  if (pos - 1 >= 1 && x[pos - 1][1] == '.')
    Q.push(make_pair(pos - 1, 1)), vis[pos - 1][1] = 1;
  while (!Q.empty()) {
    pair<int, int> k = Q.front();
    Q.pop();
    if (k.second >= len) {
      printf("YES\n");
      return;
    }
    int a = k.first, b = k.second;
    if (x[a][b + 1] == '.' && x[a][b + 2] == '.' && x[a][b + 3] == '.') {
      if (vis[a][b + 3] == 0) Q.push(make_pair(a, b + 3)), vis[a][b + 3] = 1;
      if (vis[a + 1][b + 3] == 0 && a + 1 <= 3 && x[a + 1][b + 3] == '.')
        Q.push(make_pair(a + 1, b + 3)), vis[a + 1][b + 3] = 1;
      if (vis[a - 1][b + 3] == 0 && a - 1 >= 1 && x[a - 1][b + 3] == '.')
        Q.push(make_pair(a - 1, b + 3)), vis[a - 1][b + 3] = 1;
    }
  }
  printf("NO\n");
  return;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d", &len, &m);
    cin >> x[1] >> x[2] >> x[3];
    memset(vis, 0, sizeof(vis));
    x[1] += "....";
    x[3] += "....";
    x[2] += "....";
    fin();
  }
}
