func_code_string: #include <bits/stdc++.h>   using namespace std;   int t;   int a[4][100100];   vector<int> beg[4], en[4];   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cin >> t;     while (t--) {       bool out = 1;       int n, noob;       cin >> n >> noob;       for (int i = 1; i <= 3; i++) {         for (int j = 1; j <= n; j++) {           char x;           cin >> x;           if (x ==  s )             a[i][j] = 1;           else if (x ==  . )             a[i][j] = 0;           else             a[i][j] = 3;         }       }       for (int i = 1; i <= 3; i++)         for (int j = 1; j <= n; j++) {           if (a[i][j] == 3 && (j == 1 || a[i][j - 1] != 3)) beg[i].push_back(j);           if (a[i][j] == 3 && (j == n || a[i][j + 1] != 3)) en[i].push_back(j);         }       for (int j = 1; j < n; j++) {         for (int i = 1; i <= 3; i++)           if (a[i][j] == 1 && a[i][j + 1] != 3) a[i][j + 1] = 1, a[i][j] = 0;         if (a[2][j + 1] == 1) {           if (a[1][j + 1] == 0) a[1][j + 1] = 1;           if (a[3][j + 1] == 0) a[3][j + 1] = 1;         } else if (a[1][j + 1] == 1 && a[2][j + 1] == 0)           a[2][j + 1] = 1;         else if (a[3][j + 1] == 1 && a[2][j + 1] == 0)           a[2][j + 1] = 1;         for (int i = 1; i <= 3; i++) {           for (int k = 0; k < en[i].size(); k++) {             int e = en[i][k];             a[i][e] = 0;             if (e > 1) a[i][e - 1] = 0;             en[i][k] = max(0, e - 2);           }           for (int k = 0; k < beg[i].size(); k++) {             int b = beg[i][k];             if (b > 1) a[i][b - 1] = 3;             if (b > 2) a[i][b - 2] = 3;             beg[i][k] = max(0, b - 2);           }         }         bool check = 0;         for (int i = 1; i <= 3; i++)           if (a[i][j + 1] == 1) check = 1;         if (check == 0) {           out = 0;         }       }       if (out)         cout <<  YES  << endl;       else         cout <<  NO  << endl;       for (int i = 1; i <= 3; i++) {         beg[i].clear();         en[i].clear();       }     }     return 0;   }   