#include <bits/stdc++.h>
using namespace std;
int n, k;
char s[3][210];
bool vis[3][210], flag;
int step[3] = {-1, 0, 1};
void dfs(int x, int y) {
  vis[x][y] = 1;
  if (y >= n - 1) {
    flag = true;
    return;
  }
  if (s[x][y + 1] != '.') return;
  for (int i = 0; i < 3; i++) {
    int tx = x + step[i];
    if (tx >= 0 && tx < 3) {
      if (s[tx][y + 1] == '.' && s[tx][y + 2] == '.' && s[tx][y + 3] == '.' &&
          !vis[tx][y + 3])
        dfs(tx, y + 3);
    }
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    int x, y;
    for (int i = 0; i < 3; i++) {
      cin >> s[i];
      for (int j = 0; j < n; j++) {
        if (s[i][j] == 's') x = i, y = j;
      }
      for (int j = n; j < n * 2; j++) s[i][j] = '.';
    }
    flag = false;
    memset(vis, 0, sizeof(vis));
    dfs(x, y);
    cout << (flag ? "YES" : "NO") << endl;
  }
  return 0;
}
