#include <bits/stdc++.h>
using namespace std;
void A();
void B();
void C();
void D();
void E();
void F();
int main() {
  D();
  return 0;
}
string arr[3];
int n, k;
vector<pair<int, int> > trains[3];
bool check(int i, int j, int steps) {
  for (int k = 0; k < (int)trains[i].size(); k++) {
    pair<int, int> p = trains[i][k];
    if (p.first - 2 * steps <= j && p.second - 2 * steps >= j) return false;
  }
  return true;
}
int dp[4][111][333];
int solve(int i, int j, int steps) {
  if (!check(i, j, steps)) return 0;
  if (j == n) return 1;
  int &ans = dp[i][j][steps];
  if (ans != -1) return ans;
  ans = 0;
  if (check(i, j + 1, steps)) {
    ans = solve(i, j + 1, steps + 1);
    if (i > 0 && check(i - 1, j + 1, steps)) {
      ans |= solve(i - 1, j + 1, steps + 1);
    }
    if (i + 1 < 3 && check(i + 1, j + 1, steps)) {
      ans |= solve(i + 1, j + 1, steps + 1);
    }
  }
  return ans;
}
void D() {
  int t, x, y;
  scanf("%d", &t);
  while (t--) {
    scanf("%d %d", &n, &k);
    for (int i = 0; i < 3; i++) {
      cin >> arr[i];
      for (int j = 0; j < n; j++) {
        if (arr[i][j] == '.') continue;
        if (arr[i][j] == 's')
          x = i, y = j;
        else {
          trains[i].push_back(make_pair(j, -1));
          j++;
          while (j < n && arr[i][j] == arr[i][j - 1]) {
            j++;
          }
          trains[i][(int)trains[i].size() - 1].second = j - 1;
          j--;
        }
      }
    }
    for (int i = 0; i < 4; i++)
      for (int j = 0; j <= n; j++)
        for (int x = 0; x <= 300; x++) dp[i][j][x] = -1;
    printf("%s\n", solve(x, y, 0) ? "YES" : "NO");
    trains[0].clear();
    trains[1].clear();
    trains[2].clear();
  }
}
