#include <bits/stdc++.h>
using namespace std;
vector<int> circle_of_life(vector<int>& state, long long T) {
int N = state.size();
vector<int> result = state;
vector<int> temp(N);
for (long long step = 1; T > 0; step <<= 1) {
if (T & step) {
for (int i = 0; i < N; i++) {
temp[i] = result[(i - step + N) % N] ^ result[(i + step) % N];
}
result = temp;
T -= step;
}
}
return result;
}
int main() {
int N;
long long T;
cin >> N >> T;
string initialState;
cin >> initialState;
vector<int> state(N);
for (int i = 0; i < N; i++) {
state[i] = initialState[i] - '0';
}
vector<int> finalState = circle_of_life(state, T);
for (int cell : finalState) {
cout << cell;
}
cout << endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdmVjdG9yPGludD4gY2lyY2xlX29mX2xpZmUodmVjdG9yPGludD4mIHN0YXRlLCBsb25nIGxvbmcgVCkgewogICAgaW50IE4gPSBzdGF0ZS5zaXplKCk7CiAgICB2ZWN0b3I8aW50PiByZXN1bHQgPSBzdGF0ZTsKICAgIHZlY3RvcjxpbnQ+IHRlbXAoTik7CiAgICAKICAgIGZvciAobG9uZyBsb25nIHN0ZXAgPSAxOyBUID4gMDsgc3RlcCA8PD0gMSkgewogICAgICAgIGlmIChUICYgc3RlcCkgeyAKICAgICAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBOOyBpKyspIHsKICAgICAgICAgICAgICAgIHRlbXBbaV0gPSByZXN1bHRbKGkgLSBzdGVwICsgTikgJSBOXSBeIHJlc3VsdFsoaSArIHN0ZXApICUgTl07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVzdWx0ID0gdGVtcDsKICAgICAgICAgICAgVCAtPSBzdGVwOwogICAgICAgIH0KICAgIH0KICAgIHJldHVybiByZXN1bHQ7Cn0KCmludCBtYWluKCkgewogICAgaW50IE47CiAgICBsb25nIGxvbmcgVDsKICAgIGNpbiA+PiBOID4+IFQ7CiAgICBzdHJpbmcgaW5pdGlhbFN0YXRlOwogICAgY2luID4+IGluaXRpYWxTdGF0ZTsKICAgIAogICAgdmVjdG9yPGludD4gc3RhdGUoTik7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IE47IGkrKykgewogICAgICAgIHN0YXRlW2ldID0gaW5pdGlhbFN0YXRlW2ldIC0gJzAnOwogICAgfQoKICAgIHZlY3RvcjxpbnQ+IGZpbmFsU3RhdGUgPSBjaXJjbGVfb2ZfbGlmZShzdGF0ZSwgVCk7CiAgICAKICAgIGZvciAoaW50IGNlbGwgOiBmaW5hbFN0YXRlKSB7CiAgICAgICAgY291dCA8PCBjZWxsOwogICAgfQogICAgY291dCA8PCBlbmRsOwogICAgCiAgICByZXR1cm4gMDsKfQo=