#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-9;
const long long int mod = 1e9 + 7;
const long long int inf = 1LL << 30;
const int MAXN = 1e5 + 5;
void cp() {
  int n, k;
  cin >> n >> k;
  vector<string> arr(3);
  for (string &x : arr) cin >> x;
  vector<vector<bool>> vis(3, vector<bool>(n + 5));
  queue<pair<int, int>> q;
  if (arr[0][0] == 's')
    q.push({0, 0});
  else if (arr[1][0] == 's')
    q.push({1, 0});
  else
    q.push({2, 0});
  auto can = [&](int nx, int ny, int step) {
    return nx >= 0 && nx < 3 &&
           ((ny + step >= n - 1) ||
            (ny + step < n && arr[nx][ny + step] == '.' &&
             !vis[nx][ny + step]));
  };
  bool reach = false;
  while (!q.empty() && !reach) {
    pair<int, int> node = q.front();
    q.pop();
    int x = node.first, y = node.second;
    vis[x][y] = 1;
    if (y >= n - 1) reach = true;
    if (can(x, y, 1)) {
      int ny = y + 1;
      if (can(x - 1, ny, 0)) {
        int nx = x - 1;
        if (can(nx, ny, 1) && can(nx, ny, 2))
          q.push({nx, ny + 2}), vis[nx][ny + 2] = 1;
      }
      if (can(x, ny, 0)) {
        int nx = x;
        if (can(nx, ny, 1) && can(nx, ny, 2))
          q.push({nx, ny + 2}), vis[nx][ny + 2] = 1;
      }
      if (can(x + 1, ny, 0)) {
        int nx = x + 1;
        if (can(nx, ny, 1) && can(nx, ny, 2))
          q.push({nx, ny + 2}), vis[nx][ny + 2] = 1;
      }
    }
  }
  cout << (reach ? "YES\n" : "NO\n");
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  t = 1;
  cin >> t;
  while (t--) {
    cp();
  }
  return 0;
}
