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