#include <bits/stdc++.h>
using namespace std;
int n, p, f;
string s;
void solve() {
  cin >> n >> p >> s;
  for (int i = 0; i < n - p; i++) {
    if (s[i] == '.' and s[i + p] == '.') {
      s[i] = '1';
      s[i + p] = '0';
      for (int j = 0; j < n; j++) {
        if (s[j] == '.') {
          cout << '0';
        } else
          cout << s[j];
      }
      return;
    } else if (s[i] == '.') {
      s[i] = '0' + '1' - s[i + p];
      for (int j = 0; j < n; j++) {
        if (s[j] == '.') {
          cout << '0';
        } else
          cout << s[j];
      }
      return;
    } else if (s[i + p] == '.') {
      s[i + p] = '0' + '1' - s[i];
      for (int j = 0; j < n; j++) {
        if (s[j] == '.') {
          cout << '0';
        } else
          cout << s[j];
      }
      return;
    } else if (s[i] != s[i + p]) {
      f = 1;
    }
  }
  if (f) {
    for (int j = 0; j < n; j++) {
      if (s[j] == '.') {
        cout << '0';
      } else
        cout << s[j];
    }
  } else {
    cout << "No" << '\n';
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
