#include <bits/stdc++.h>
using namespace std;
void gk() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
int mul(int a, int b) { return (a * b) % (int)1000000007; }
int inv(int a, int b, int &x, int &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  int x1, y1;
  int g = inv(b, a % b, x1, y1);
  x = y1;
  y = x1 - (a / b) * y1;
  return g;
}
int bexpo(int a, int n) {
  int res = 1;
  while (n > 0) {
    if (n & 1) {
      res = (res * a);
    }
    a = (a * a);
    n >>= 1;
  }
  return res;
}
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int row[4] = {1, -1, 0, 0};
int col[4] = {0, 0, -1, 1};
const int sz = 200;
const int sz2 = 3500;
int n;
int m;
int k;
int visited[3][sz];
void find() {
  memset(visited, 0, sizeof(visited));
  cin >> n >> k;
  vector<string> ar(3);
  for (string &s : ar) {
    cin >> s;
  }
  vector<array<int, 3> > temp;
  int x = 0;
  int y = 0;
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < n;) {
      int k = j;
      if (ar[i][j] == '.') {
        j++;
        continue;
      } else if (ar[i][j] == 's') {
        x = i;
        y = j;
        j++;
        continue;
      }
      while (k < n && ar[i][k] >= 'A' && ar[i][k] <= 'Z') {
        k++;
      }
      temp.push_back({i, j, k - j - 1});
      j = k;
    }
  }
  queue<array<int, 2> > q;
  q.push({x, y});
  visited[x][y] = 1;
  while (q.empty() == false) {
    int sz = q.size();
    while (sz--) {
      array<int, 2> u = q.front();
      q.pop();
      int x = u[0];
      int y = u[1];
      int l = 1;
      for (array<int, 3> i : temp) {
        if (i[0] == x && i[1] <= y && i[1] + i[2] >= y) {
          l = 0;
          break;
        }
      }
      if (l == 0) {
        continue;
      }
      int f = 1;
      for (array<int, 3> i : temp) {
        if (i[0] == x) {
          if (i[1] == y + 1) {
            f = 0;
            break;
          }
          if (i[1] == y + 3) {
            l = 0;
          }
        }
      }
      if (f && y + 1 == n - 1) {
        cout << "YES\n";
        return;
      }
      if (!f) continue;
      y += 1;
      if (f) {
        if (!visited[x][y] && l) {
          visited[x][y] = 1;
          q.push({x, y});
        }
      }
      if (u[0] == 0 && f) {
        for (array<int, 3> i : temp) {
          if (i[0] == 1 && i[1] <= y && i[1] + i[2] >= y) {
            f = 0;
            break;
          }
        }
        if (f) {
          if (!visited[x + 1][y]) {
            visited[x + 1][y] = 1;
            q.push({x + 1, y});
          }
        }
      } else if (u[0] == 2 && f) {
        for (array<int, 3> i : temp) {
          if (i[0] == 1 && i[1] <= y && i[1] + i[2] >= y) {
            f = 0;
            break;
          }
        }
        if (f) {
          if (!visited[1][y]) {
            visited[1][y] = 1;
            q.push({1, y});
          }
        }
      } else if (f) {
        int f1 = 1;
        int f2 = 1;
        for (array<int, 3> i : temp) {
          if (i[0] == 0 && i[1] <= y && i[1] + i[2] >= y) {
            f1 = 0;
          }
          if (i[0] == 2 && i[1] <= y && i[1] + i[2] >= y) {
            f2 = 0;
          }
        }
        if (f1) {
          if (!visited[0][y]) {
            visited[0][y] = 1;
            q.push({0, y});
          }
        }
        if (f2) {
          if (!visited[2][y]) {
            visited[2][y] = 1;
            q.push({2, y});
          }
        }
      }
    }
    for (array<int, 3> &i : temp) {
      int y = i[1];
      if (y - 2 < 0) {
        i[1] = 0;
        i[2] += y - 2;
      } else {
        i[1] = y - 2;
      }
    }
  }
  cout << "NO\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  std::cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    find();
  }
  return 0;
}
