#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(false);
  long long int n, a;
  char c;
  cin >> n >> a;
  vector<char> v(n);
  for (long long int i = (0); i < (long long int)(n); ++i) {
    cin >> v[i];
  }
  bool changed = false;
  for (long long int i = (0); i < (long long int)(n - a); ++i) {
    if (v[i] == v[i + a] && v[i] != '.' && v[i + a] != '.') {
      continue;
    }
    changed = true;
    if (v[i] == '.' && v[i + a] == '.') {
      v[i] = '0';
      v[i + a] = '1';
      break;
    }
    if (v[i] == '.') {
      v[i] = v[i + a] == '0' ? '1' : '0';
      break;
    }
    if (v[i + a] == '.') {
      v[i + a] = v[i] == '0' ? '1' : '0';
      break;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (v[i] == '.') v[i] = '0';
  }
  if (!changed) {
    cout << "No" << endl;
    return 0;
  }
  for (long long int i = (0); i < (long long int)(n); ++i) {
    cout << v[i];
  }
  cout << endl;
  return 0;
}
