#include <bits/stdc++.h>
using namespace std;
int n, m = 3;
int dp[105][10];
int main() {
  int n, sum, t, k;
  long long ans;
  while (~scanf("%d", &t)) {
    while (t--) {
      char c[105];
      char a[105][105];
      int x, y;
      memset(dp, 0, sizeof(dp));
      scanf("%d%d", &n, &k);
      for (int i = 1; i <= m; i++) {
        scanf("%s", c);
        for (int j = 1; j <= n; j++) {
          a[j][i] = c[j - 1];
          if (a[j][i] == 's') {
            dp[j][i] = 1;
            x = j;
            y = i;
          }
        }
      }
      for (int i = x + 1; i <= n; i += 3)
        for (int j = 1; j <= m; j++) {
          if (a[i][j] != '.') continue;
          if (dp[i - 1][j] || (dp[i - 1][j - 1] && a[i][j - 1] == '.') ||
              (dp[i - 1][j + 1] && a[i][j + 1] == '.')) {
            dp[i][j] = 1;
            if (a[i + 1][j] == '.') dp[i + 1][j] = 1;
            if (a[i + 2][j] == '.') dp[i + 2][j] = 1;
          }
        }
      int i;
      for (i = 1; i <= m; i++)
        if (dp[n][i]) break;
      if (i == m + 1)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    }
  }
  return 0;
}
