#include <bits/stdc++.h>
using namespace std;
#pragma GCC diagnostic ignored "-Wmissing-declarations"
int main() {
  ios_base::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  for (int i = 0; i + k < n; ++i) {
    if (s[i] != s[i + k] || (s[i] == '.' && s[i + k] == '.')) {
      if (s[i] == '.') {
        s[i] = s[i + k] == '.' ? '0' : (s[i + k] == '0' ? '1' : '0');
      }
      if (s[i + k] == '.') s[i + k] = s[i] == '0' ? '1' : '0';
      for (int j = 0; j < n; ++j)
        if (s[j] == '.') s[j] = '0';
      cout << s << endl;
      return 0;
    }
  }
  cout << "No\n";
}
