#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long n, p;
void Input() { cin >> n >> p; }
void Solve() {
  string second;
  cin >> second;
  string osf = second;
  for (long long i = 0; i < n; i++)
    if (osf[i] == '.') osf[i] = '0';
  for (long long i = 0; i < n; i++) {
    if (i + p >= n) break;
    if (second[i] != second[i + p] or
        (second[i] == '.' and second[i + p] == '.')) {
      if (second[i] == '0')
        osf[i + p] = '1';
      else if (second[i] == '1')
        osf[i + p] = '0';
      else if (second[i + p] == '0')
        osf[i] = '1';
      else if (second[i + p] == '1')
        osf[i] = '0';
      else
        osf[i] = '1';
      cout << osf;
      return;
    }
  }
  cout << "no";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long T = 1;
  while (T--) {
    Input();
    Solve();
  }
  return 0;
}
