#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, c = 0, c1 = 0, c2 = 0, d, e, f = 0, g, h, i, j, k, l, m, n;
  cin >> n >> m;
  string s, s1, s2;
  cin >> s;
  s1 = s;
  s2 = s;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '.') {
      s1[i] = '0';
      s2[i] = '1';
    }
  }
  for (i = 0, j = m; i < m && j < n; i++, j++) {
    if (s[i] == s[j] && s[i] != '.' && s1[j] != '.') {
      c++;
    }
  }
  if (c == (n - m)) {
    cout << "No" << endl;
    return 0;
  }
  for (i = 0, j = m; i < m && j < n; i++, j++) {
    if (s1[i] == s1[j] && s[i] == '.') {
      if (s1[i] == '0') {
        s1[i] = '1';
        f = 1;
      } else if (s1[i] == '1') {
        s1[i] = '0';
        f = 1;
      }
    } else if (s1[i] == s1[j] && s[j] == '.') {
      if (s1[j] == '0') {
        s1[j] = '1';
        f = 1;
      } else if (s1[j] == '1') {
        s1[j] = '0';
        f = 1;
      }
    }
    if (s1[i] == '0') {
      c1++;
    }
    if (s1[j] == '0') {
      c1++;
    }
    if (s1[i] == '1') {
      c2++;
    }
    if (s1[j] == '1') {
      c2++;
    }
  }
  if (f == 0 && ((n - m) > m)) {
    for (i = (n - m); i < n; i++) {
      if (s1[i] == '0' && s[i] == '.' && c1 == (n - m)) {
        s1[i] = '1';
        f = 1;
        break;
      } else if (s1[i] == '1' && s[i] == '.' && c1 == (n - m)) {
        s1[i] = '0';
        f = 1;
        break;
      }
    }
  }
  cout << s1 << endl;
}
