#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  cin >> n >> p;
  string s;
  cin >> s;
  bool b = 0;
  for (int i = 0; i < s.size() - p; i++) {
    if (s[i] == '0') {
      if (s[i + p] == '0')
        continue;
      else if (s[i + p] == '1') {
        b = 1;
        break;
      } else {
        b = 1;
        s[i + p] = '1';
        break;
      }
    } else if (s[i] == '1') {
      if (s[i + p] == '1')
        continue;
      else if (s[i + p] == '0') {
        b = 1;
        break;
      } else {
        b = 1;
        s[i + p] = '0';
        break;
      }
    } else if (s[i] == '.') {
      if (s[i + p] == '1') {
        s[i] = '0';
        b = 1;
        break;
      } else if (s[i + p] == '0') {
        s[i] = '1';
        b = 1;
        break;
      } else {
        b = 1;
        s[i + p] = '0';
        s[i] = '1';
        break;
      }
    }
  }
  if (b) {
    for (int i = 0; i < s.size(); i++)
      if (s[i] == '.')
        cout << 1;
      else
        cout << s[i];
  } else
    cout << "No";
}
