#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[6][10005], f[3][6][10005];
int main() {
  ios_base::sync_with_stdio(0);
  int T;
  cin >> T;
  while (T--) {
    cin >> n >> k;
    memset(f, 0, sizeof(f));
    memset(a, 0, sizeof(a));
    for (int i = 1; i <= 3; i++) {
      string s;
      cin >> s;
      for (int j = 0; j < n; j++) {
        if (s[j] == 's') {
          f[1][i][j + 1] = 1;
          continue;
        }
        if (s[j] != '.') a[i][j + 1] = 1;
      }
    }
    for (int j = 2; j <= n + 3; j++) {
      for (int i = 1; i <= 3; i++) {
        if (a[i][j]) continue;
        f[0][i][j] = f[1][i][j - 1];
        if (a[i + 1][j] == 0) f[0][i][j] = max(f[0][i][j], f[1][i + 1][j - 1]);
        if (a[i - 1][j] == 0) f[0][i][j] = max(f[0][i][j], f[1][i - 1][j - 1]);
        if (a[i][j - 1] == 0) f[1][i][j] = f[0][i][j - 2];
      }
    }
    int ans = 0;
    for (int l = 0; l <= 2; l++)
      for (int i = 1; i <= 3; i++)
        for (int p = 0; p <= 1; p++) ans = max(ans, f[p][i][n + l]);
    if (ans)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
