#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long int t = 1;
  while (t--) {
    long long int n, k;
    cin >> n >> k;
    string s;
    cin >> s;
    bool ok = 1;
    for (long long int i = 0; i < n - k; i++) {
      if (s[i] != s[i + k]) ok = 0;
      if (s[i] == '.' && s[i + k] == '.') {
        s[i] = '0';
        s[i + k] = '1';
        ok = 0;
      }
      if (s[i] == '.') {
        ok = 0;
        if (s[i + k] == '1')
          s[i] = '0';
        else
          s[i] = '1';
      }
      if (s[i + k] == '.') {
        ok = 0;
        if (s[i] == '1')
          s[i + k] = '0';
        else
          s[i + k] = '1';
      }
    }
    for (long long int i = 0; i < n; i++)
      if (s[i] == '.') s[i] = '0';
    if (ok == 0)
      cout << s;
    else
      cout << "No";
  }
}
