#include <bits/stdc++.h>
using namespace std;
int n, p;
string str, help;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> p >> str;
  help = str;
  reverse(help.begin(), help.end());
  for (int i = n - 1; i >= 0; i--) {
    if (str[i] == '.') {
      if (i - p >= 0) {
        if (str[i - p] == '1') {
          for (int j = 0; j < n; j++) {
            if (str[j] == '.')
              cout << "0";
            else
              cout << str[j];
          }
        } else if (str[i - p] == '0') {
          for (int j = 0; j < n; j++) {
            if (str[j] == '.')
              cout << "1";
            else
              cout << str[j];
          }
        } else {
          for (int j = 0; j < n; j++) {
            if (j != i - p && str[j] == '.')
              cout << "1";
            else if (j == i - p && str[j] == '.')
              cout << "0";
            else
              cout << str[j];
          }
        }
        return 0;
      } else if (i + p < n) {
        if (str[i + p] == '1') {
          for (int j = 0; j < n; j++) {
            if (str[j] == '.')
              cout << "0";
            else
              cout << str[j];
          }
        } else if (str[i + p] == '0') {
          for (int j = 0; j < n; j++) {
            if (str[j] == '.')
              cout << "1";
            else
              cout << str[j];
          }
        } else {
          for (int j = 0; j < n; j++) {
            if (j != i && str[j] == '.')
              cout << "1";
            else if (j == i && str[j] == '.')
              cout << "0";
            else
              cout << str[j];
          }
        }
        return 0;
      }
    }
  }
  bool st = 1;
  for (int i = 0; i < n - p; i++) {
    if (str[i] != str[i + p]) st = 0;
  }
  if (st == 1) return cout << "No", 0;
  for (int i = 0; i < n; i++) {
    if (str[i] == '.')
      cout << "0";
    else
      cout << str[i];
  }
  return 0;
}
