#include <bits/stdc++.h>
const long double PI = acos(-1.0);
const long double E = exp(1.0);
const long long INF = 0x3f3f3f3f;
const long long MOD = 1e9 + 7;
using namespace std;
const int MAXN = 4e6 + 10;
char arr[5][200];
int ok[5][200];
bool check(int x, int y) {
  if (arr[x][y] != '.' || arr[x][y - 1] != '.' || arr[x][y - 2] != '.')
    return false;
  if (arr[x][y - 3] == '.' && ok[x][y - 3]) return true;
  if (x != 2) {
    if (arr[x + 1][y - 2] == '.' && arr[x + 1][y - 3] == '.' &&
        ok[x + 1][y - 3])
      return true;
  }
  if (x != 0) {
    if (arr[x - 1][y - 2] == '.' && arr[x - 1][y - 3] == '.' &&
        ok[x - 1][y - 3])
      return true;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    memset(arr, '.', sizeof(arr));
    memset(ok, 0, sizeof(ok));
    int n, k;
    cin >> n >> k;
    for (int i = 0; i < 3; ++i) {
      for (int j = 0; j < n; ++j) {
        cin >> arr[i][j];
        if (arr[i][j] == 's') ok[i][j] = 1, arr[i][j] = '.';
      }
    }
    bool flag = false;
    for (int j = 3; j < n + 10; j++) {
      for (int i = 0; i < 3; ++i) {
        if (check(i, j)) {
          ok[i][j] = true;
          if (j >= n - 1) flag = true;
        }
      }
    }
    if (flag)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
