#include <bits/stdc++.h>
using namespace std;
int const N = 5e5 + 10, oo = 1e9;
int mod = oo + 7;
long long const OO = 1e18;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, p;
  string s;
  cin >> n >> p >> s;
  bool yes = 0;
  for (int i = 0; i < n - p; i++) {
    if (s[i] == '.') {
      yes = 1;
      if (s[i + p] == '.') {
        s[i] = '0';
        s[i + p] = '1';
        break;
      }
      if (s[i + p] == '1')
        s[i] = '0';
      else
        s[i] = '1';
      yes = 1;
      break;
    }
    if (s[i + p] == '.') {
      yes = 1;
      if (s[i] == '1')
        s[i + p] = '0';
      else
        s[i + p] = '1';
      break;
    }
    if (s[i] != s[i + p]) {
      yes = 1;
      break;
    }
  }
  if (!yes) {
    cout << "No\n";
    return 0;
  }
  for (int i = 0; i < n; i++)
    if (s[i] == '.') s[i] = '1';
  cout << s << endl;
  return 0;
}
