Given an array $a$ of length $n$, you can do at most $k$ operations of the following type on it:

choose $2$ different elements in the array, add $1$ to the first, and subtract $1$ from the second. However, all the elements of $a$ have to remain non-negative after this operation.

What is lexicographically the smallest array you can obtain?

An array $x$ is lexicographically smaller than an array $y$ if there exists an index $i$ such that $x_i<y_i$, and $x_j=y_j$ for all $1 \le j < i$. Less formally, at the first index $i$ in which they differ, $x_i<y_i$.


-----Input-----

The first line contains an integer $t$ ($1 \le t \le 20$) – the number of test cases you need to solve.

The first line of each test case contains $2$ integers $n$ and $k$ ($2 \le n \le 100$, $1 \le k \le 10000$) — the number of elements in the array and the maximum number of operations you can make.

The second line contains $n$ space-separated integers $a_1$, $a_2$, $\ldots$, $a_{n}$ ($0 \le a_i \le 100$) — the elements of the array $a$.


-----Output-----

For each test case, print the lexicographically smallest array you can obtain after at most $k$ operations.


-----Examples-----

Input
2
3 1
3 1 4
2 10
1 0
Output
2 1 5 
0 1


-----Note-----

In the second test case, we start by subtracting $1$ from the first element and adding $1$ to the second. Then, we can't get any lexicographically smaller arrays, because we can't make any of the elements negative.

Difficulty: EASY

Solutions:
import sys
txt = sys.stdin.read()
(a, *b) = txt.strip().split('\n')
for i in range(0, 2 * int(a), 2):
	(n, k, arr) = (*b[i].split(' '), b[i + 1].split(' '))
	k = int(k)
	arr = list(map(int, arr))
	arr[-1] += k
	for i in range(int(n) - 1):
		(arr[i], k) = (max([0, arr[i] - k]), max([0, k - arr[i]]))
		if not k:
			break
	arr[-1] -= k
	for i in arr:
		print(i, end=' ')
	print()


def solve(arr, k):
	i = 0
	n = len(arr)
	while k > 0 and i < n - 1:
		op = min(k, arr[i])
		arr[i] -= op
		k -= op
		arr[-1] += op
		i += 1
	for a in arr:
		print(a, end=' ')
	print()
t = int(input())
for _ in range(t):
	(n, k) = [int(x) for x in input().split()]
	arr = [int(x) for x in input().split()]
	solve(arr, k)


T = int(input())
while T:
	T -= 1
	(n, k) = map(int, input().split())
	nums = list(map(int, input().split()))
	for i in range(n - 1):
		if k <= 0:
			break
		if nums[i] >= k:
			nums[i] -= k
			nums[-1] += k
			k = 0
		if nums[i] < k:
			k -= nums[i]
			nums[-1] += nums[i]
			nums[i] = 0
	for i in nums:
		print(i, end=' ')
	print()


t = int(input())
for w in range(t):
	inp = input().split()
	n = int(inp[0])
	k = int(inp[1])
	arr = []
	inp = input().split()
	for i in inp:
		arr.append(int(i))
	for j in range(n - 1):
		if arr[j] <= k:
			arr[-1] += arr[j]
			k -= arr[j]
			arr[j] = 0
		else:
			arr[j] -= k
			arr[-1] += k
			break
	for i in arr:
		print(i, end=' ')
	print()


def funn(a, k):
	sm = 0
	n = len(a)
	for i in range(n - 1):
		if a[i] > 0:
			if a[i] <= k:
				sm += a[i]
				k -= a[i]
				a[i] = 0
			else:
				sm += k
				a[i] -= k
				k = 0
	a[-1] += sm
	return a
t = int(input())
while t:
	(n, k) = map(int, input().split())
	a = list(map(int, input().split()))
	w = funn(a, k)
	for i in w:
		print(i, end=' ')
	print()
	t = t - 1


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	l = list(map(int, input().split()))
	i = 0
	j = n - 1
	while k > 0 and i < j:
		temp = l[i]
		if l[i] >= k:
			l[i] = l[i] - k
			l[j] += k
			break
		else:
			l[i] = 0
			l[j] += temp
			k = k - temp
		i += 1
	for i in l:
		print(i, end=' ')
	print()


for testcase in range(int(input())):
	(n, k) = [int(x) for x in input().split()]
	a = [int(x) for x in input().split()]
	i = 0
	while k > 0 and i < n - 1:
		subtract = min(a[i], k)
		k -= subtract
		a[i] -= subtract
		a[-1] += subtract
		i = i + 1
	for u in a:
		print(u, end=' ')
	print('')


def minSequence(a, k):
	if len(a) == 2:
		if a[0] > k:
			a[0] = a[0] - k
			a[1] = a[1] + k
		else:
			a[1] = sum(a)
			a[0] = 0
	else:
		i = 0
		while a[i] <= k and i != len(a) - 1:
			a[-1] += a[i]
			k -= a[i]
			a[i] = 0
			i += 1
		if i != len(a) - 1:
			if k != 0:
				a[i] -= k
				a[-1] += k
	return a
t = int(input())
for i in range(t):
	(n, k) = [int(x) for x in input().split()]
	a = [int(x) for x in input().split()]
	a = minSequence(a, k)
	for i in a:
		print(i, end=' ')
	print(end='\n')


t = int(input())
for test in range(t):
	(n, k) = map(int, input().split())
	arr = list(map(int, input().split()))
	i = 0
	while k > 0 and i < n - 1:
		diff = arr[i] - k
		if diff >= 0:
			arr[i] -= k
			arr[n - 1] += k
			k -= k
		else:
			k -= arr[i]
			arr[n - 1] += arr[i]
			arr[i] = 0
			i += 1
	for x in arr:
		print(x, end=' ')
	print()


import sys
inputs = []
for line in sys.stdin:
	inputs.append(line.rstrip())
times = int(inputs[0])
values = []
n_k = []
starting = 1
for i in range(0, times):
	temp = [int(x) for x in inputs[starting].split(' ')]
	n_k.append(temp)
	temp = [int(x) for x in inputs[starting + 1].split(' ')]
	values.append(temp)
	starting += 2
for itera in range(times):
	prev = []
	i = n_k[itera][1]
	right = n_k[itera][0] - 1
	left = 0
	while i != 0:
		if left >= right:
			break
		prev = values[itera]
		shift = 0
		if values[itera][left] > i:
			shift = i
		else:
			shift = values[itera][left]
		i -= shift
		values[itera][left] -= shift
		values[itera][right] += shift
		if values[itera][left] == 0:
			left += 1
for i in values:
	for j in i:
		print(j, end=' ')
	print()


for i in range(int(input())):
	(n, k) = map(int, input().split())
	a = list(map(int, input().split()))
	c = 0
	for j in range(n - 1):
		if a[j] >= k:
			a[j] = a[j] - k
			c = c + k
			k = 0
			break
		else:
			c = c + a[j]
			k = k - a[j]
			a[j] = 0
	a[-1] = a[-1] + c
	for j in a:
		print(j, end=' ')
	print()


for _ in range(int(input())):
	(n, k) = map(int, input().strip().split())
	a = list(map(int, input().strip().split()))
	x = n - 1
	for i in range(n):
		if x == i or k == 0:
			break
		if a[i] > 0:
			if k >= a[i]:
				k -= a[i]
				a[x] += a[i]
				a[i] = 0
			else:
				a[i] -= k
				a[x] += k
				k = 0
	for n in a:
		print(n, end=' ')
	print()


t = int(input())

def smallest(L, n, k):
	counter = k
	i = 0
	while i < n - 1 and counter > 0:
		if L[i] > 0:
			if L[i] > counter:
				L[i] -= counter
				L[-1] += counter
				counter = 0
			else:
				L[-1] += L[i]
				counter -= L[i]
				L[i] = 0
		i += 1
	return L
for _ in range(t):
	(n, k) = [int(x) for x in input().split()]
	L = [int(x) for x in input().split()]
	E = smallest(L, n, k)
	for element in E:
		print(element, end=' ')
	print()


t = int(input())
for _ in range(t):
	(n, k) = map(int, input().split())
	l = list(map(int, input().split()))
	i = 0
	while k != 0:
		if l[i] <= k:
			a = l[i]
			l[i] = 0
			k = k - a
			l[-1] = l[-1] + a
		else:
			l[i] = l[i] - k
			l[-1] = l[-1] + k
			k = 0
		i = i + 1
		if i == n - 1:
			break
	for i in l:
		print(i, end=' ')
	print()


aaaaa = int(input())
for i in range(aaaaa):
	b = input().split()
	c = input().split()
	num = int(b[1])
	for (po, j) in enumerate(c):
		c[po] = int(j)
	po = 0
	l = len(c)
	while True:
		if c[po] >= num:
			c[po] -= num
			c[l - 1] += num
			break
		else:
			c[l - 1] += c[po]
			num -= c[po]
			c[po] = 0
			po += 1
		if po >= l - 1:
			break
	for j in c:
		print(j, end=' ')
	print()


import sys
import os.path
if os.path.exists('input_file.txt'):
	sys.stdin = open('input_file.txt', 'r')
	sys.stdout = open('output_file.txt', 'w')
for _ in range(int(input())):
	(n, k) = map(int, input().split())
	a = list(map(int, input().split()))
	for i in range(n - 1):
		if k == 0:
			break
		elif a[i] > 0:
			if a[i] >= k:
				a[i] -= k
				a[-1] += k
				k = 0
			else:
				ss = k - a[i]
				a[-1] += a[i]
				k -= a[i]
				a[i] = 0
	for ii in a:
		print(ii, end=' ')
	print()


t = int(input())
for q in range(t):
	(n, k) = map(int, input().split())
	arr = list(map(int, input().split()))
	for i in range(n - 1):
		if k - arr[i] >= 0:
			arr[n - 1] += arr[i]
			k = k - arr[i]
			arr[i] = 0
		else:
			arr[n - 1] += k
			arr[i] -= k
			k = 0
	for i in arr:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	(n, k) = [int(x) for x in input().split()]
	arr = [int(x) for x in input().split()]
	if k <= arr[0]:
		sub = min(arr[0], k)
		arr[0] = arr[0] - sub
		arr[n - 1] = arr[n - 1] + sub
		for i in arr:
			print(i, end=' ')
		print()
	else:
		for i in range(0, n - 1):
			temp = k
			k = k - arr[i]
			arr[n - 1] += min(arr[i], temp)
			arr[i] = max(arr[i] - temp, 0)
			if k <= 0:
				break
		for i in arr:
			print(i, end=' ')
		print()


t = int(input())
for _ in range(t):
	(n, k) = list(map(int, input().split()))
	arr = list(map(int, input().split()))
	m = n - 1
	for i in range(m):
		if arr[i] >= k:
			arr[i] = arr[i] - k
			arr[m] += k
			break
		else:
			k -= arr[i]
			arr[m] += arr[i]
			arr[i] = 0
	for i in range(n):
		print(arr[i], end=' ')
	print('')