#include <bits/stdc++.h>
using namespace std;
struct GameLine {
  int trainsCnt;
  int lineLen;
  vector<int> trainPos;
  vector<int> trainLen;
  GameLine(int _lineLen) : trainsCnt(0), lineLen(_lineLen) {}
  void AddTrain(int pos, int len) {
    trainPos.push_back(pos);
    trainLen.push_back(len);
    trainsCnt++;
  }
  bool TrainAtPos(int pos, int time) {
    for (int i = 0; i < trainsCnt; ++i) {
      int curPos = trainPos[i] - 2 * time;
      if (curPos + trainLen[i] < lineLen && curPos <= pos &&
          curPos + trainLen[i] > pos) {
        return true;
      } else if (curPos + trainLen[i] >= lineLen &&
                 (curPos <= pos || pos < trainLen[i] - lineLen + curPos)) {
        return true;
      }
    }
    return false;
  }
};
int t, n, k;
int dp[6][105];
vector<GameLine> lines;
int compare(const void* a, const void* b) {
  int int_a = *((int*)a);
  int int_b = *((int*)b);
  if (int_a == int_b)
    return 0;
  else if (int_a < int_b)
    return -1;
  else
    return 1;
}
int main(int argc, const char* argv[]) {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d", &n, &k);
    char s[500];
    int trains = 0;
    for (int i = 0; i < 3; ++i) {
      memset(dp[i], 0, sizeof(dp[i]));
    }
    lines.clear();
    for (int i = 0; i < 3; ++i) {
      scanf("%s", s);
      lines.push_back(GameLine(n));
      for (int j = 0; j < n; ++j) {
        if (s[j] == 's') {
          dp[i][j] = true;
        } else if (s[j] != '.') {
          int trainSt = j;
          while (j < n && s[j] != '.') {
            j++;
          }
          lines[i].AddTrain(trainSt, j - trainSt);
        }
      }
    }
    for (int i = 1; i < n; ++i) {
      dp[0][i] =
          !lines[0].TrainAtPos(i, i) && !lines[0].TrainAtPos(i, i - 1) &&
          (dp[0][i - 1] || (dp[1][i - 1] && !lines[1].TrainAtPos(i, i - 1)));
      dp[2][i] =
          !lines[2].TrainAtPos(i, i) && !lines[2].TrainAtPos(i, i - 1) &&
          (dp[2][i - 1] || (dp[1][i - 1] && !lines[1].TrainAtPos(i, i - 1)));
      dp[1][i] =
          !lines[1].TrainAtPos(i, i) && !lines[1].TrainAtPos(i, i - 1) &&
          (dp[1][i - 1] || (dp[0][i - 1] && !lines[0].TrainAtPos(i, i - 1)) ||
           (dp[2][i - 1] && !lines[2].TrainAtPos(i, i - 1)));
    }
    bool ok = false;
    for (int i = 1; i <= 3; ++i) {
      if (dp[i][n - 1]) {
        ok = true;
      }
    }
    if (ok) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
