#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
void solve() {
  int n, p;
  cin >> n >> p;
  string s;
  cin >> s;
  bool ok = false;
  for (int i = 0; i < (n - p); ++i) {
    if (s[i] == '0') {
      if (s[i + p] != '0') {
        ok = true;
        s[i + p] = '1';
      }
    } else if (s[i] == '1') {
      if (s[i + p] != '1') {
        ok = true;
        s[i + p] = '0';
      }
    } else {
      ok = true;
      if (s[i + p] == '0')
        s[i] = '1';
      else if (s[i + p] == '1')
        s[i] = '0';
      else {
        s[i] = '0';
        s[i + p] = '1';
      }
    }
  }
  for (int i = n - p; i < n; ++i) {
    if (s[i] == '.') s[i] = '0';
  }
  if (ok)
    cout << s << endl;
  else
    cout << "No" << endl;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
