import sys int1 = lambda x: int(x) - 1 # input = lambda: sys.stdin.buffer.readline() input = lambda: sys.stdin.readline().rstrip() ii = lambda: int(input()) i1 = lambda: int1(input()) mi = lambda: map(int, input().split()) mi1 = lambda: map(int1, input().split()) li = lambda: list(mi()) li1 = lambda: list(mi1()) lli = lambda n: [li() for _ in range(n)] INF = float("inf") mod = int(1e9 + 7) # mod = 998244353 def next(s): a = [] for j in range(len(s) - 1): a.append("0" if s[j : j + 2] == "11" else "1") return a def show(s): n = len(s) t = [" ".join(list(s))] m = [s] for i in range(1, n)[::-1]: t.append(" " * (n - i) + " ".join(next(m[-1]))) m.append("".join(next(m[-1]))) for v in t[::-1]: print(v) n, k = mi() s = input() for _ in range(2): s = "".join(next(s)) n -= 1 if k == n: print(s) exit(0) for _ in range(2): s = "".join(next(s)) n -= 1 if k == n: print(s) exit(0) if (k & 1) == (n & 1): d = (n - k) // 2 print(s[d : n - d]) exit(0)