#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e7;
const int MOD = (int)1e9 + 9;
const int inf = (int)5e8;
const long long infll = (long long)1e17;
void print(string s) {
  for (auto c : s) {
    if (c == '.') {
      cout << '1';
    } else {
      cout << c;
    }
  }
  cout << endl;
}
void solve() {
  int n, p;
  cin >> n >> p;
  string s;
  cin >> s;
  for (int i = 0; i + p < s.size(); ++i) {
    if (s[i] == '.') {
      if (s[i + p] == '.') {
        s[i] = '1';
        s[i + p] = '0';
        print(s);
        return;
      } else {
        s[i] = (s[i + p] - '0') ^ 1 + '0';
        print(s);
        return;
      }
    } else {
      if (s[i + p] == '.') {
        s[i + p] = (s[i] - '0') ^ 1 + '0';
        print(s);
        return;
      } else if (s[i + p] != s[i]) {
        print(s);
        return;
      }
    }
  }
  cout << "No" << endl;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
