#include <bits/stdc++.h>
using namespace std;
int n, p;
string x;
string ans;
vector<int> pos;
int main() {
  cin >> n >> p >> x;
  for (int i = 0; i < x.size(); i++) {
    if (x[i] == '.') pos.push_back(i);
    ans += x[i];
  }
  for (int i = 0; i < 1000; i++) {
    for (int j = 0; j < pos.size(); j++) ans[pos[j]] = (rand() & 1 ? '1' : '0');
    int bad = 1;
    for (int j = 0; j + p < ans.size(); j++)
      if (ans[j] != ans[j + p]) bad = 0;
    if (!bad) {
      cout << ans;
      return 0;
    }
  }
  cout << "No";
}
