#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 5;
const long long inf = 1e18;
int n, k;
string s;
void solve2() {
  for (int i = 0; i < n; i++)
    if (s[i] == '.') s[i] = '0';
}
bool solve(int x, int y) {
  if (s[x] == '.' && s[y] == '.') {
    s[x] = '1';
    s[y] = '0';
    return 1;
  }
  if (s[x] == '.') {
    s[x] = '0' + '1' - s[y];
    return 1;
  }
  if (s[y] == '.') {
    s[y] = '0' + '1' - s[x];
    return 1;
  }
  if (s[x] != s[y]) return 1;
  return 0;
}
int main() {
  cin >> n >> k;
  cin >> s;
  for (int i = 0; i + k < n; i++) {
    if (solve(i, i + k)) {
      solve2();
      cout << s;
      return 0;
    }
  }
  cout << "NO";
}
