import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

immutable long MOD = 10^^9+7;

void main() {
    auto s = readln.split.map!(to!int);
    auto N = s[0];
    auto p = s[1];
    auto S = readln.chomp.to!(dchar[]);

    bool ans = false;

    for (int i = 0; i + p < N; ++i) {
        int j = i + p;
        if (S[i] == '.') {
            ans = true;
            if (S[i] == S[j]) {
                S[i] = '0';
                S[j] = '1';
            } else {
                S[i] = S[j] == '0' ? '1' : '0';
            }
        } else if (S[j] == '.') {
            ans = true;
            S[j] = S[i] == '0' ? '1' : '0';
        } else if (S[i] == '0' && S[j] == '1') {
            ans = true;
        } else if (S[i] == '1' && S[j] == '0') {
            ans = true;
        }
    }

    if (ans) {
        foreach (i; 0..N) if (S[i] == '.') S[i] = '0';
        S.writeln;
    } else {
        writeln("No");
    }
}
