#include <bits/stdc++.h>
using namespace std;
string a[3];
bool b[3][200][2];
int N;
int Y, q;
bool B(int x, int y) {
  if (a[x][y] == '.' && a[x][y + 1] == '.' && a[x][y + 2] == '.')
    return true;
  else
    return false;
}
bool yes(int x, int y) {
  if (y >= Y - 1) {
    if (a[x][y] == '.')
      return true;
    else
      return false;
  }
  y++;
  if (a[x][y] == '.') {
    bool c = false;
    for (int i = x - 1; i <= x + 1; i++) {
      if (i >= 0 && i < 3)
        if (a[i][y] == '.' && a[i][y + 1] == '.' && a[i][y + 2] == '.') {
          if (!b[i][y + 2][0]) {
            b[i][y + 2][0] = true;
            b[i][y + 2][1] = yes(i, y + 2);
          }
          c = b[i][y + 2][1];
          if (c) {
            break;
          }
        }
    }
    return c;
  } else {
    return false;
  }
}
int main() {
  cin >> N;
  while (N--) {
    memset(b, 0, sizeof(b));
    cin >> Y >> q;
    cin >> a[0] >> a[1] >> a[2];
    a[0] += "...";
    a[1] += "...";
    a[2] += "...";
    int x, y;
    for (int i = 0; i < 3; i++) {
      if (a[i][0] == 's') {
        x = i;
        y = 0;
      }
    }
    if (yes(x, y))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
