#include <bits/stdc++.h>   using namespace std;   template <class T>   inline void umax(T &a, T b) {     if (a < b) a = b;   }   const int maxn = 4000 + 5;   const int INF = 1e9 + 7;   const double eps = 1e-8;   string a[10];   int dp[4][105];   int n, k;   int valid(int x, int y) {     if (x >= 0 && x < n && y >= 0 && y < 3) return true;     return false;   }   int rec(int posy, int posx) {     if (posy < 0 || posy >= 3) return 0;     if (posx >= n - 1) return 1;     if (dp[posy][posx] != -1) return dp[posy][posx];     int &ret = dp[posy][posx];     ret = 0;     if (posx >= n - 1) {       ret = 1;       return ret;     }     if (a[posy][posx + 1] !=  . ) {       ret = 0;       return ret;     }     for (int i = (-1); i < (2); i++) {       if (posy + i < 0 || posy + i >= 3) continue;       if (a[posy + i][posx + 1] !=  . ) continue;       if (a[posy + i][posx + 2] !=  . ) continue;       if (a[posy + i][posx + 3] !=  . ) continue;       ret |= rec(posy + i, posx + 3);     }     return ret;   }   inline void solve(void) {     int t;     cin >> t;     while (t--) {       memset(dp, -1, sizeof dp);       cin >> n >> k;       for (int i = (0); i < (3); i++) cin >> a[i];       for (int i = (0); i < (3); i++)         for (int j = (0); j < (7); j++) a[i].push_back( . );       int posy, posx;       for (int i = (0); i < (3); i++)         for (int j = (0); j < (n); j++)           if (a[i][j] ==  s ) posx = j, posy = i;       if (rec(posy, posx)) {         cout <<  YES n ;       } else         cout <<  NO n ;     }     return;   }   void init() {     ios::sync_with_stdio(false);     cin.tie(nullptr);   }   int main(int argc, const char *argv[]) {     init();     solve();     return 0;   }   