def Run_Length_Encoding(S): """ランレングス圧縮 S:文字列 """ if not S: return [] R=[[S[0],1]] for i in range(1,len(S)): if R[-1][0]==S[i]: R[-1][1]+=1 else: R.append([S[i],1]) return R #================================================== def solve(): N,K=map(int,input().split()) S=list(map(int,input())) A=[0]*(N-1); B=[0]*(N-2) for i in range(N-1): A[i]=1-S[i]*S[i+1] for i in range(N-2): B[i]=1-A[i]*A[i+1] if len(B)%2==0: A,B=B,A if K%2==0: t=(len(A)-K)//2 Ans=A[t:len(A)-t] else: t=(len(B)-K)//2 Ans=B[t:len(B)-t] print(*Ans,sep="") solve()