#include <bits/stdc++.h>
using namespace std;
int n, k;
bool done = false;
int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    done = false;
    cin >> n >> k;
    int startx, starty;
    int mat[3][200];
    bool time[3][200][200] = {}, visited[3][200][200] = {};
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < n; j++) {
        char q;
        cin >> q;
        if (q == 's') {
          startx = j;
          starty = i;
          mat[i][j] = 1;
        } else if (q == '.')
          mat[i][j] = 0;
        else
          mat[i][j] = 2;
      }
    }
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < n; j++) {
        if (mat[i][j] == 2) {
          int tt = 0;
          time[i][j][tt] = true;
          for (int k = j - 2; k >= 0; k -= 2) {
            time[i][k][++tt] = true;
          }
        }
      }
    }
    if (0)
      for (int k = 0; k < 7; k++) {
        cout << k << ": \n";
        for (int i = 0; i < 3; i++) {
          for (int j = 0; j < n; j++) {
            cout << time[i][j][k] << " ";
          }
          cout << endl;
        }
        cout << endl << endl << endl;
      }
    bool found = false;
    deque<pair<pair<int, int>, int> > q;
    q.push_back(make_pair(make_pair(startx, starty), 0));
    while (!q.empty()) {
      int xc = q.front().first.first;
      int yc = q.front().first.second;
      int t = q.front().second;
      q.pop_front();
      if (time[yc][xc][t] == true) continue;
      if (time[yc][xc + 1][t] == true) continue;
      if (visited[yc][xc][t] == true) continue;
      visited[yc][xc][t] = true;
      if (0) cout << "\n\n--- " << xc << " " << yc << " " << t << endl;
      if (xc >= n - 1) {
        if (0) cout << xc << " " << yc << " " << t << " FOUNNDDD!!!!!\n";
        found = true;
        break;
      }
      if (yc == 2) {
        if (time[yc - 1][xc + 1][t] == false) {
          if (0) cout << xc + 1 << " " << yc - 1 << " " << t + 1 << endl;
          q.push_back(make_pair(make_pair(xc + 1, yc - 1), t + 1));
        }
        if (time[yc][xc + 1][t] == false) {
          if (0) cout << xc + 1 << " " << yc << " " << t + 1 << endl;
          q.push_back(make_pair(make_pair(xc + 1, yc), t + 1));
        }
      } else if (yc == 0) {
        if (time[yc + 1][xc + 1][t] == false) {
          if (0) cout << xc + 1 << " " << yc + 1 << " " << t + 1 << endl;
          q.push_back(make_pair(make_pair(xc + 1, yc + 1), t + 1));
        }
        if (time[yc][xc + 1][t] == false) {
          if (0) cout << xc + 1 << " " << yc << " " << t + 1 << endl;
          q.push_back(make_pair(make_pair(xc + 1, yc), t + 1));
        }
      } else {
        if (time[yc + 1][xc + 1][t] == false) {
          if (0) cout << xc + 1 << " " << yc + 1 << " " << t + 1 << endl;
          q.push_back(make_pair(make_pair(xc + 1, yc + 1), t + 1));
        }
        if (time[yc - 1][xc + 1][t] == false) {
          if (0) cout << xc + 1 << " " << yc - 1 << " " << t + 1 << endl;
          q.push_back(make_pair(make_pair(xc + 1, yc - 1), t + 1));
        }
        if (time[yc][xc + 1][t] == false) {
          if (0) cout << xc + 1 << " " << yc << " " << t + 1 << endl;
          q.push_back(make_pair(make_pair(xc + 1, yc), t + 1));
        }
      }
    }
    if (!found)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
