#include <bits/stdc++.h>
using namespace std;
int i, n, n_trains;
char a[3][105];
bool ispos(int x, int y) {
  if (y >= n) return 1;
  if (a[x][y] == '.') return 1;
  return 0;
}
bool func(int x, int y) {
  if (n - y <= 2) return 1;
  a[x][y] = '#';
  if (a[x][y + 1] != '.') return 0;
  if (ispos(x, y + 3) && func(x, y + 3)) return 1;
  if (x > 0 && a[x - 1][y + 1] == '.' && ispos(x - 1, y + 3) &&
      func(x - 1, y + 3))
    return 1;
  if (x < 2 && a[x + 1][y + 1] == '.' && ispos(x + 1, y + 3) &&
      func(x + 1, y + 3))
    return 1;
  return 0;
}
int main() {
  int T;
  cin >> T;
  while (T-- > 0) {
    cin >> n >> n_trains;
    for (int p = 0; p < 3; ++p) cin >> a[p];
    int answer = 0;
    for (int p = 0; p < 3; ++p) {
      if (a[p][0] == 's') {
        answer = func(p, 0);
      }
    }
    if (answer == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
