def main(): import sys input = sys.stdin.read().split() idx = 0 N = int(input[idx]) idx += 1 K = int(input[idx]) idx += 1 S = input[idx] # Compute for each j, the result of the reduction of S[j:j + (N-K +1)] result = [] for j in range(K): end = j + (N - K + 1) current_layer = S[j:end] # Compute the reduction while len(current_layer) > 1: next_layer = [] for i in range(len(current_layer) - 1): a = int(current_layer[i]) b = int(current_layer[i+1]) if a == 1 and b == 1: next_layer.append('0') else: next_layer.append('1') current_layer = ''.join(next_layer) result.append(current_layer[0]) print(''.join(result)) if __name__ == '__main__': main()