#include <bits/stdc++.h>
int i, n, p;
char str[2020];
int show() {
  i = 0;
  while (i < n) printf("%c", str[i] ? str[i] == 1 ? '1' : '0' : '0'), i++;
  puts("");
}
int main() {
  scanf("%i%i%s", &n, &p, str);
  while (str[i]) (str[i] = str[i] == '.' ? 0 : str[i] == '1' ? 1 : -1), i++;
  for (i = 0; i < n - p; i++)
    if (str[i] && str[i] == -str[i + p]) {
      show();
      return 0;
    } else if (!str[i]) {
      (str[i] = str[i + p] ? -str[i + p] : (str[i + p] = 1, -1)), show();
      return 0;
    } else if (!str[i + p]) {
      (str[i + p] = str[i] ? -str[i] : (str[i] = 1, -1)), show();
      return 0;
    }
  printf("No\n");
}
