#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  long long int n, k, i, j;
  cin >> n >> k;
  cin >> s;
  s = "0" + s;
  for (i = k + 1; i <= n; i++) {
    if ((s[i - k] == s[i]) && s[i] != '.')
      continue;
    else {
      for (j = k + 1; j <= n; j++) {
        if (s[j] == '.' && s[j - k] != '.') {
          if (s[j - k] == '1')
            s[j] = '0';
          else
            s[j] = '1';
        }
        if (s[j] != '.' && s[j - k] == '.') {
          if (s[j] == '1')
            s[j - k] = '0';
          else
            s[j - k] = '1';
        }
        if (s[j] == '.' && s[j - k] == '.') {
          s[j] = '1';
          s[j - k] = '0';
        }
      }
      for (j = 1; j <= n; j++) {
        if (s[j] == '.')
          cout << 1;
        else
          cout << s[j];
      }
      exit(0);
    }
  }
  cout << "No";
}
