#include <bits/stdc++.h>
using namespace std;
void sieve(int N) {
  bool isPrime[N + 1];
  for (int i = 0; i <= N; ++i) {
    isPrime[i] = true;
  }
  isPrime[0] = false;
  isPrime[1] = false;
  for (int i = 2; i * i <= N; ++i) {
    if (isPrime[i] == true) {
      for (int j = i * i; j <= N; j += i) isPrime[j] = false;
    }
  }
}
long long int d, x, y;
void extendedEuclid(long long int A, long long int B) {
  if (B == 0) {
    d = A;
    x = 1;
    y = 0;
  } else {
    extendedEuclid(B, A % B);
    long long int temp = x;
    x = y;
    y = temp - (A / B) * y;
  }
}
long long int modInverse(long long int A, long long int M) {
  extendedEuclid(A, M);
  return (x % M + M) % M;
}
long long int n, k;
string arr[3];
long long int dp[3][109][2];
bool dfs(long long int x, long long int y, long long int t) {
  if (arr[x][y] != '.') return false;
  if (y >= n - 1) return true;
  if (dp[x][y][t] != -1) return dp[x][y][t];
  if (t == 0) {
    if (arr[x][y + 1] != '.') return false;
    bool ti = dfs(x, y + 1, 1);
    if (x != 0) ti |= dfs(x - 1, y + 1, 1);
    if (x != 2) ti |= dfs(x + 1, y + 1, 1);
    dp[x][y][t] = ti;
    if (ti == false) {
      return false;
    } else
      return true;
  } else {
    if (arr[x][y + 1] != '.') return false;
    y++;
    if (arr[x][y + 1] != '.') return false;
    bool tmpp = dfs(x, y + 1, 0);
    dp[x][y][t] = tmpp;
    return tmpp;
  }
}
void machayenge() {
  long long int t;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    for (long long int i = 0; i < 3; ++i)
      for (long long int j = 0; j < 109; ++j)
        for (long long int x = 0; x < 2; ++x) dp[i][j][x] = -1;
    long long int s1, s2;
    for (long long int i = 0; i < 3; ++i) {
      cin >> arr[i];
      if (arr[i][0] == 's') {
        arr[i][0] = '.';
        s1 = i;
        s2 = 0;
      }
    }
    for (long long int i = 0; i < 3; ++i)
      for (long long int j = 0; j < 3; ++j) arr[i] += '.';
    bool ch = dfs(s1, 0, 0);
    if (ch)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  machayenge();
  return 0;
}
