#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
static void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
static void amax(T &x, U y) {
  if (x < y) x = y;
}
int main() {
  int n, p;
  cin >> n >> p;
  string s;
  cin >> s;
  for (int i = p; i < (n); ++i) {
    char L = s[i - p], R = s[i];
    if (L != '.' && R != '.') {
      if (L == R) continue;
      goto can;
    }
    if (L == '.') {
      if (R == '.') {
        s[i - p] = '0';
        s[i] = '1';
      } else {
        int x = 1 - (s[i] - '0');
        s[i - p] = ('0' + x);
      }
      goto can;
    }
    if (R == '.') {
      int x = 1 - (s[i - p] - '0');
      s[i] = ('0' + x);
      goto can;
    }
  }
  cout << "No" << endl;
  return 0;
can:
  for (int i = 0; i < (int)(n); ++i)
    if (s[i] == '.') s[i] = '0';
  cout << s << endl;
}
