func_code_string: #include <bits/stdc++.h>   int memo[3][105], n;   char map[3][105];   int f(int x, int y) {     if (y >= n) return 2;     if (memo[x][y] == 0) {       if (map[x][y + 1] !=  . ) return memo[x][y] = 1;       int ret = 0;       if (map[x][y + 1] ==  .  && map[x][y + 2] ==  .  && map[x][y + 3] ==  . )         ret |= f(x, y + 3) - 1;       if (x > 0 && map[x - 1][y + 1] ==  .  && map[x - 1][y + 2] ==  .  &&           map[x - 1][y + 3] ==  . )         ret |= f(x - 1, y + 3) - 1;       if (x < 2 && map[x + 1][y + 1] ==  .  && map[x + 1][y + 2] ==  .  &&           map[x + 1][y + 3] ==  . )         ret |= f(x + 1, y + 3) - 1;       memo[x][y] = ret + 1;     }     return memo[x][y];   }   int main() {     int z, i;     char dap[3][10] = {  ,  NO ,  YES };     scanf( %d , &z);     while (z--) {       int m, x, y, t;       for (i = 0; i < 105; i++) memo[0][i] = memo[1][i] = memo[2][i] = 0;       scanf( %d%d%s%s%s , &n, &m, map[0], map[1], map[2]);       map[0][n] = map[0][n + 1] = map[0][n + 2] =  . ;       map[1][n] = map[1][n + 1] = map[1][n + 2] =  . ;       map[2][n] = map[2][n + 1] = map[2][n + 2] =  . ;       if (map[0][0] ==  s )         t = 0;       else if (map[1][0] ==  s )         t = 1;       else         t = 2;       printf( %s n , dap[f(t, 0)]);     }   }   