func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     int r, c, i, j, flag = 0;     cin >> r >> c;     char a[r + 2][c + 2];     for (i = 0; i < (r + 2); i++) {       for (j = 0; j < (c + 2); j++) a[i][j] =  . ;     }     for (i = 1; i < (r + 1); i++) {       for (j = 1; j < (c + 1); j++) {         cin >> a[i][j];       }     }     for (i = 1; i < (r + 1); i++) {       for (j = 1; j < (c + 1); j++) {         if (a[i][j] ==  S ) {           if (a[i + 1][j] ==  W  || a[i][j + 1] ==  W  || a[i - 1][j] ==  W  ||               a[i][j - 1] ==  W ) {             flag = 1;             cout <<  No n ;             break;           }         }       }       if (flag == 1) break;     }     if (flag == 0) {       cout <<  Yes n ;       for (i = 1; i < (r + 1); i++) {         for (j = 1; j < (c + 1); j++) {           if (a[i][j] ==  . )             cout <<  D ;           else             cout << a[i][j];         }         cout <<   n ;       }     }     return 0;   }   