#include <bits/stdc++.h>
using namespace std;
long long low, high, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
    w, x, y, z, maxi, mini, ans, mid;
string s1, s2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> m >> n;
  cin >> s1;
  for (i = 0; i < m; ++i) {
    if (i + n >= m) break;
    if ((s1[i] == s1[i + n] && s1[i] != '.')) continue;
    f = 1;
  }
  if (f) {
    k = 0;
    for (i = 0; i < s1.size(); ++i) {
      if (i + n >= m) break;
      if (k) {
        if (s1[i] == '.')
          cout << '0';
        else
          cout << s1[i];
        continue;
      }
      if (s1[i] == '.' && s1[i + n] == '.') {
        s1[i] = '0';
        s1[i + n] = '1';
        k = 1;
      } else if (s1[i] == '.') {
        z = s1[i + n] - '0';
        z = 1 - z;
        s1[i] = '0' + z;
        k = 1;
      } else if (s1[i + n] == '.') {
        z = s1[i] - '0';
        z = 1 - z;
        s1[i + n] = '0' + z;
        k = 1;
      }
      cout << s1[i];
    }
    for (; i < s1.size(); ++i)
      if (s1[i] != '.')
        cout << s1[i];
      else
        cout << '0';
    return 0;
  }
  cout << "NO" << endl;
}
