#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using cd = complex; constexpr ll mod = 1e9 + 7, maxn = 3e5 + 10; ll lgput(ll x, ll y, ll r) { return y == 0 ? r : lgput(x * x % mod, y / 2, y % 2 ? x * r % mod : r); } ll gcd(ll x, ll y) { return y == 0 ? x : gcd(y, x % y); } pair euclid_extins(ll x, ll y) { pair tmp; return x == 0 ? make_pair(0ll, 1ll) : (tmp = euclid_extins(y % x, x), swap(tmp.first, tmp.second), tmp.first -= tmp.second * (y / x), tmp); } ll inv_mod(ll x, ll mod) { return (euclid_extins(mod, x).second % mod + mod) % mod; } int nand(int x, int y) { return 1 - (x & y); } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n, k; string s; cin >> n >> k >> s; k = n - k; int kk = (k - 5) / 2; k -= 2 * kk; vector t(begin(s) + kk, end(s) - kk); for (auto& x : t) x -= '0'; while (k--) { vector u(t.size() - 1); for (int i = 0; i < u.size(); ++i) u[i] = nand(t[i], t[i + 1]); t = u; } for (int i = 0; i < t.size(); ++i) cout << t[i]; }