#include <bits/stdc++.h>
using namespace std;
void fast_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
long long n, p;
string s;
signed main() {
  fast_io();
  cin >> n >> p >> s;
  for (long long i = 0; i < n - p; i++) {
    if (s[i] == '.' and s[i + p] == '.') {
      s[i] = '0';
      s[i + p] = '1';
    } else if (s[i] == '.') {
      if (s[i + p] == '1')
        s[i] = '0';
      else
        s[i] = '1';
    } else if (s[i + p] == '.') {
      if (s[i] == '1')
        s[i + p] = '0';
      else
        s[i + p] = '1';
    }
  }
  bool period = 1;
  for (long long i = 0; i < n - p; i++)
    if (s[i] != s[i + p]) period = 0;
  if (period) {
    cout << "No" << endl;
    return 0;
  } else {
    for (long long i = 0; i < n; i++) {
      if (s[i] == '.')
        cout << '0';
      else
        cout << s[i];
    }
    cout << endl;
  }
}
