func_code_string: #include <bits/stdc++.h>   using namespace std;   char getOtherValue(char val) {     if (val ==  . ) return  0 ;     if (val ==  1 ) return  0 ;     return  1 ;   }   int main() {     int n, p;     cin >> n >> p;     string str;     cin >> str;     bool ok = false;     for (int i = 0; i < n - p; ++i) {       if (str[i] ==  .  || str[i] != str[i + p]) {         ok = true;         if (str[i] ==  . ) {           str[i] = getOtherValue(str[i + p]);         }         if (str[i + p] ==  . ) {           str[i + p] = getOtherValue(str[i]);         }         break;       }     }     if (ok) {       for (int i = 0; i < n; ++i) {         if (str[i] ==  . ) {           str[i] =  0 ;         }       }       cout << str;       return 0;     }     cout <<  NO ;     return 0;   }   