You are given a binary string of length $n$. You have exactly $k$ moves. In one move, you must select a single bit. The state of all bits except that bit will get flipped ($0$ becomes $1$, $1$ becomes $0$). You need to output the lexicographically largest string that you can get after using all $k$ moves. Also, output the number of times you will select each bit. If there are multiple ways to do this, you may output any of them.

A binary string $a$ is lexicographically larger than a binary string $b$ of the same length, if and only if the following holds:

in the first position where $a$ and $b$ differ, the string $a$ contains a $1$, and the string $b$ contains a $0$.


-----Input-----

The first line contains a single integer $t$ ($1 \le t \le 1000$)  — the number of test cases.

Each test case has two lines. The first line has two integers $n$ and $k$ ($1 \leq n \leq 2 \cdot 10^5$; $0 \leq k \leq 10^9$).

The second line has a binary string of length $n$, each character is either $0$ or $1$.

The sum of $n$ over all test cases does not exceed $2 \cdot 10^5$.


-----Output-----

For each test case, output two lines.

The first line should contain the lexicographically largest string you can obtain.

The second line should contain $n$ integers $f_1, f_2, \ldots, f_n$, where $f_i$ is the number of times the $i$-th bit is selected. The sum of all the integers must be equal to $k$.


-----Examples-----

Input
6
6 3
100001
6 4
100011
6 0
000000
6 1
111001
6 11
101100
6 12
001110
Output
111110
1 0 0 2 0 0 
111110
0 1 1 1 0 1 
000000
0 0 0 0 0 0 
100110
1 0 0 0 0 0 
111111
1 2 1 3 0 4 
111110
1 1 4 2 0 4


-----Note-----

Here is the explanation for the first testcase. Each step shows how the binary string changes in a move.

Choose bit $1$: ${\underline{1}00001} \rightarrow {\underline{1}}\color{blue}{11110}$.

Choose bit $4$: ${111\underline{1}10} \rightarrow \color{blue}{000}{\underline{1}}\color{blue}{01}$.

Choose bit $4$: ${000\underline{1}01} \rightarrow \color{blue}{111}{\underline{1}}\color{blue}{10}$.

The final string is $111110$ and this is the lexicographically largest string we can get.

Difficulty: EASY

Solutions:
t = int(input())
out = ''
for _ in range(t):
	(n, k) = [int(x) for x in input().split()]
	string = input()
	counts = [0] * n
	count = 0
	ans = ''
	for i in range(n - 1):
		if count == k:
			if k % 2 == 0:
				ans += string[i:-1]
			else:
				for x in string[i:-1]:
					ans += str(1 - int(x))
			break
		ans += '1'
		if k % 2 == int(string[i]):
			count += 1
			counts[i] = 1
	counts[-1] += k - count
	if (counts[-1] + int(string[-1])) % 2 == k % 2:
		ans += '0'
	else:
		ans += '1'
	out += ans + '\n'
	for x in counts:
		out += str(x) + ' '
	out += '\n'
print(out)


cases = int(input())
while cases:
	cases -= 1
	(n, k) = map(int, input().split())
	s = input()
	i = 0
	sol = [0] * n
	kk = k
	for i in range(len(s)):
		if k == 0:
			break
		if kk % 2 == 1 and s[i] == '1':
			sol[i] += 1
			k -= 1
		elif kk % 2 == 0 and s[i] == '0':
			sol[i] += 1
			k -= 1
	sol[n - 1] += k
	ret = ''
	for i in range(n):
		flip = kk - sol[i]
		if flip % 2 == 0:
			ret += s[i]
		elif s[i] == '1':
			ret += '0'
		else:
			ret += '1'
	print(ret)
	printsol = ''
	for i in sol:
		printsol += str(i) + ' '
	print(printsol)


tc = int(input())
for _ in range(tc):
	(n, k) = list(map(int, input().split()))
	s = list(input())
	ans = [0] * n
	t = k
	for i in range(n):
		c = int(s[i])
		if k & 1 == c & 1:
			if t != 0:
				ans[i] = 1
				s[i] = '1'
				t -= 1
			else:
				s[i] = '0'
		else:
			s[i] = '1'
	if t != 0:
		ans[n - 1] += t
		if t % 2 != 0:
			s[n - 1] = '0'
	print(''.join(s))
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())

def f(n, k, s):
	arr = [0 for i in range(n)]
	f_sum = 0
	s_new = ''
	for i in range(len(s)):
		if s[i] + k % 2 != 1 and f_sum < k:
			arr[i] += 1
			f_sum += 1
			s_new += '1'
		elif k % 2 == 0:
			s_new += str(s[i])
		elif s[i] == 1:
			s_new += '0'
		else:
			s_new += '1'
	if f_sum != k:
		arr[-1] += k - f_sum
		s_new = s_new[:len(s_new) - 1]
		if (k - arr[-1]) % 2 != 0:
			if s[-1] == 0:
				s_new += '1'
			else:
				s_new += '0'
		else:
			s_new += str(s[-1])
	print(s_new)
	for i in arr:
		print(i, end=' ')
	print('')
for i in range(t):
	line = [int(j) for j in input().split()]
	n = line[0]
	k = line[1]
	s = [int(j) for j in input()]
	f(n, k, s)


loopcount = int(input())
for loop in range(loopcount):
	x = input()
	x = x.split(' ')
	x = list(map(int, x))
	s = input()
	s = list(s)
	movesLeft = x[1]
	odd = True
	if x[1] % 2 == 0:
		odd = False
	output = ''
	sequence = [0] * x[0]
	for i in range(x[0]):
		if movesLeft == 0:
			break
		if odd and s[i] == '1':
			sequence[i] += 1
			movesLeft -= 1
		if not odd and s[i] == '0':
			sequence[i] += 1
			movesLeft -= 1
	sequence[x[0] - 1] += movesLeft
	if not odd:
		for i in range(x[0]):
			if sequence[i] % 2 == 1:
				if s[i] == '1':
					output += '0'
				else:
					output += '1'
			else:
				output += s[i]
	if odd:
		for i in range(x[0]):
			if sequence[i] % 2 == 0:
				if s[i] == '1':
					output += '0'
				else:
					output += '1'
			else:
				output += s[i]
	print(output)
	for i in range(x[0]):
		print(sequence[i], end=' ')
	print()


import math
from collections import defaultdict
t = int(input())
while t:
	t -= 1
	(n, k) = map(int, input().split())
	s = input()
	ans = ''
	lis = []
	tot = []
	if k % 2 == 1:
		for j in range(0, len(s)):
			if k > 0 and s[j] == '1':
				tot.append(1)
				k -= 1
			else:
				tot.append(0)
		if k > 0:
			tot[-1] = tot[-1] + k
		final = ''
		for j in range(0, len(s)):
			if s[j] == '1':
				if tot[j] % 2 == 1:
					final = final + '1'
				else:
					final = final + '0'
			elif tot[j] % 2 == 0:
				final = final + '1'
			else:
				final = final + '0'
		print(final)
		for j in tot:
			print(j, end=' ')
		print()
	else:
		for j in range(0, len(s)):
			if k > 0 and s[j] == '0':
				tot.append(1)
				k -= 1
			else:
				tot.append(0)
		if k > 0:
			tot[-1] = tot[-1] + k
		final = ''
		for j in range(0, len(s)):
			if s[j] == '1':
				if tot[j] % 2 == 0:
					final = final + '1'
				else:
					final = final + '0'
			elif tot[j] % 2 == 1:
				final = final + '1'
			else:
				final = final + '0'
		print(final)
		for j in tot:
			print(j, end=' ')
		print()


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	lst = input()
	count = [0] * n
	index = 0
	inverted = False
	ans = ''
	while index < n and k > 0:
		if lst[index] == '1' and inverted == False or (lst[index] == '0' and inverted):
			if k % 2 == 0:
				index += 1
			else:
				k -= 1
				if inverted:
					inverted = False
				else:
					inverted = True
				count[index] += 1
				index += 1
			ans += '1'
		else:
			if k % 2 != 0:
				index += 1
			else:
				k -= 1
				if inverted:
					inverted = False
				else:
					inverted = True
				count[index] += 1
				index += 1
			ans += '1'
	if len(ans) == n:
		count[-1] += k
		if k % 2 != 0:
			x = ans[:n - 1]
			if ans[-1] == '1':
				x += '0'
			else:
				x += '1'
			ans = x
	else:
		for i in range(index, n):
			if lst[i] == '1' and inverted == False or (lst[i] == '0' and inverted):
				ans += '1'
			else:
				ans += '0'
	print(ans)
	for i in count:
		print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	(n, k) = map(int, input().split(' '))
	K = k
	s = input()
	ans = [0] * n
	for j in range(n):
		if k == 0:
			break
		if j == n - 1:
			ans[j] = k
			continue
		if s[j] == '1':
			if K % 2:
				ans[j] += 1
				k -= 1
				if k == 0:
					break
		elif K % 2 == 0:
			ans[j] += 1
			k -= 1
			if k == 0:
				break
	res = ''
	for j in range(n):
		if s[j] == '1':
			if (K - ans[j]) % 2 == 0:
				res += '1'
			else:
				res += '0'
		elif (K - ans[j]) % 2 == 0:
			res += '0'
		else:
			res += '1'
	print(res)
	for j in ans:
		print(j, end=' ')
	print()


n = int(input())
for i in range(n):
	(lent, moves) = list(map(int, input().split(' ')))
	s = input()
	l1 = [0] * lent
	l2 = []
	moves1 = moves
	for i in range(len(s)):
		l2.append(s[i])
	flag = 0
	for i in range(len(s)):
		num = s[i]
		if flag % 2 == 1:
			if s[i] == '1':
				num = '0'
			else:
				num = '1'
		if moves > 0:
			if i == lent - 1:
				l2[i] = num
				l1[i] = moves
			elif moves % 2 == 0:
				if num == '0':
					l2[i] = '1'
					moves -= 1
					flag += 1
					l1[i] = 1
				else:
					l2[i] = '1'
			elif moves % 2 == 1:
				if num == '1':
					l2[i] = '1'
					moves -= 1
					flag += 1
					l1[i] = 1
				else:
					l2[i] = '1'
		else:
			l2[i] = num
	print(''.join(l2))
	for k in l1:
		print(k, end=' ')
	print()


t = int(input())
for _ in range(t):
	(n, k) = map(int, input().split())
	s = input()
	flip = [0] * n
	change = 0
	ans = ''
	temp = k
	for i in range(n):
		if k == 0:
			flip[i] = k
			break
		else:
			if change % 2 == 0:
				ch = s[i]
			elif s[i] == '1':
				ch = '0'
			else:
				ch = '1'
			if i == n - 1:
				ans += ch
				flip[i] = k
				k = 0
			elif ch == '0' and k % 2 == 0 or (ch == '1' and k % 2 == 1):
				change += 1
				flip[i] = 1
				k -= 1
				ans += '1'
			elif ch == '1' and k % 2 == 0 or (ch == '0' and k % 2 == 1):
				flip[i] = 0
				ans += '1'
	temp = len(ans)
	for i in range(temp, n):
		if change % 2 == 0:
			ans += s[i]
		elif s[i] == '1':
			ans += '0'
		else:
			ans += '1'
	print(ans)
	for val in flip:
		print(val, end=' ')
	print()


N = int(input())
for i in range(N):
	(n, k) = map(int, input().split())
	s = [int(n) for n in input()]
	ll = [0] * n
	kc = k
	ans = ''
	for i in range(n):
		if k == 0:
			break
		if kc % 2 and s[i]:
			ll[i] += 1
			k -= 1
		elif not kc % 2 and (not s[i]):
			ll[i] += 1
			k -= 1
	ll[n - 1] += k
	for i in range(n):
		flip = kc - ll[i]
		if not flip % 2:
			ans += str(1 if s[i] else 0)
		else:
			ans += str(1 if not s[i] else 0)
	print(ans)
	for i in ll:
		print(i, end=' ')
	print()


def test():
	line = input()
	(N, K) = line.split(' ')
	n = int(N)
	k = int(K)
	s = input()
	v = []
	a = 0
	for i in range(0, n):
		v.append(0)
	for i in range(0, n):
		if k == 0:
			break
		if k % 2 == 0:
			if a % 2 == 0:
				if s[i] == '0':
					v[i] += 1
					k -= 1
					a += 1
			elif s[i] == '1':
				v[i] += 1
				k -= 1
				a += 1
		elif a % 2 == 0:
			if s[i] == '1':
				v[i] += 1
				k -= 1
				a += 1
		elif s[i] == '0':
			v[i] += 1
			k -= 1
			a += 1
	rem = k
	if k > 0:
		k = int(K)
		if (k - v[0]) % 2 == 0:
			if v[0] == '1':
				v[0] += rem
			else:
				v[n - 1] += rem
		elif v[0] == '0':
			v[0] += rem
		else:
			v[n - 1] += rem
	k = int(K)
	for i in range(0, n):
		if (k - v[i]) % 2 == 0:
			print(s[i], end='')
		elif s[i] == '0':
			print('1', end='')
		else:
			print('0', end='')
	print()
	for i in v:
		print(i, end=' ')
	print()
t = int(input())
while t != 0:
	test()
	t -= 1


for _ in range(int(input())):
	(n, k) = list(map(int, input().split()))
	arr = [int(i) for i in str(input())]
	moves = [0 for i in range(n)]
	if k % 2:
		for i in range(n):
			arr[i] = arr[i] ^ 1
	for i in range(n):
		if k == 0:
			break
		if arr[i] == 0:
			k -= 1
			arr[i] = 1
			moves[i] += 1
	if k and k % 2:
		arr[-1] = 0
		moves[-1] += k
	else:
		moves[-1] += k
	for i in arr:
		print(i, end='')
	print()
	for i in moves:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	m = input().split()
	ans = 0
	n = int(m[0])
	k = int(m[1])
	a = list(input())
	dic = {}
	for kk in range(n):
		dic[kk] = 0
	if k % 2 == 1:
		for i in range(0, n):
			if a[i] == '1':
				j = i
				break
			else:
				ans = ans + 1
		if ans == n:
			j = n - 1
		for i in range(0, j):
			if a[i] == '1':
				a[i] = '0'
			else:
				a[i] = '1'
		for i in range(j + 1, n):
			if a[i] == '1':
				a[i] = '0'
			else:
				a[i] = '1'
		dic[j] = dic[j] + 1
		k = k - 1
	for s in range(n):
		if a[s] == '0' and k > 0:
			a[s] = '1'
			k = k - 1
			dic[s] = dic[s] + 1
	dic[n - 1] = dic[n - 1] + k
	if k % 2 == 1:
		a[n - 1] = '0'
	for kk in a:
		print(kk, end='')
	print()
	for u in dic.values():
		print(u, end=' ')
	print()