Problem: Being stuck at home, Ray became extremely bored. To pass time, he asks Lord Omkar to use his time bending power: Infinity Clock! However, Lord Omkar will only listen to mortals who can solve the following problem:

You are given an array a of n integers. You are also given an integer k. Lord Omkar wants you to do k operations with this array.

Define one operation as the following: 

  1. Set d to be the maximum value of your array. 
  2. For every i from 1 to n, replace a_{i} with d-a_{i}. 



The goal is to predict the contents in the array after k operations. Please help Ray determine what the final sequence will look like!

Input

Each test contains multiple test cases. The first line contains the number of cases t (1 ≤ t ≤ 100). Description of the test cases follows.

The first line of each test case contains two integers n and k (1 ≤ n ≤ 2 ⋅ 10^5, 1 ≤ k ≤ 10^{18}) – the length of your array and the number of operations to perform.

The second line of each test case contains n integers a_{1},a_{2},...,a_{n} (-10^9 ≤ a_{i} ≤ 10^9) – the initial contents of your array.

It is guaranteed that the sum of n over all test cases does not exceed 2 ⋅ 10^5.

Output

For each case, print the final version of array a after k operations described above.

Example

Input


3
2 1
-199 192
5 19
5 -1 4 2 0
1 2
69


Output


391 0
0 6 1 3 5
0

Note

In the first test case the array changes as follows:

  * Initially, the array is [-199, 192]. d = 192.

  * After the operation, the array becomes [d-(-199), d-192] = [391, 0].

Solution (in PYTHON3):

Solution:
import math
"""def maxOccurences(numbers):
    i=1
    alice = 1
    bob = 0
    while i<len(numbers)-1:
        
        if numbers[i] == numbers[i-1] and alice == 1:
            numbers.pop(i-1)
            numbers.pop(i)
            bob = 1
            alice =0

        elif numbers[i] == numbers[i-1] and bob == 1:
            numbers.pop(i-1)
            number.pop(i)
            bob = 0
            alice=1
            
        i+=1
        
    if bob==0:
        print("Bob")
    else:
        print("Alice")
a = maxOccurences([1,3,3,1,5])
print(a)"""
"""n = int(input())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
myMap = dict()
for i in range(len(x)):
    if myMap.get(x[i])== None:
        myMap[x[i]]=1
for i in range(len(y)):
    if myMap.get(y[i]) == None:
        myMap[y[i]]=1
print(myMap)
if len(myMap)==n:
    print("I become the guy.")
else:
    print("Oh, my keyboard!")"""

"""testcases = int(input())
while testcases > 0:
    a,b,k = map(int,input().split())
    aFactor = math.ceil(k/2)
    bFactor = math.floor(k/2)
    pos = a*aFactor - b*bFactor
    print(pos)
    testcases-=1"""
"""n = int(input())
if n==1:
    print(-1)
else:
    i=1
    while i<=n:
        print(str(i+1)+ " " + str(i), end=" ")
        i+=2"""
"""testcases = int(input())
while testcases > 0:
    n = int(input())
    myArray = list(map(int,input().split()))
    myMap = dict()
    for i in range(len(myArray)):
        if myMap.get(myArray[i]) == None:
            myMap[myArray[i]]=1
        else:
            myMap[myArray[i]]+=1
    if len(myMap)==1:
        print(n)
    elif len(myMap)==n:
        print(1)
    else:
        a = max(myMap, key=myMap.get)
        print(myMap[a])
    testcases-=1"""

"""testcases = int(input())
while testcases > 0:
    myString = input()
    myMap = dict()
    for i in range(len(myString)):
        if myString[i]=="1":
            if myMap.get(myString[i])== None:
                myMap[myString[i]]=1
            else:
                myMap[myString[i]]+=1
    flag=0
    i=0
    zeroCount=0
    oneCount=0
    while i<len(myString):
        if myString[i]=="1":
            if flag!=1:
                flag=1
            while i<len(myString) and myString[i]=="1":
                oneCount+=1
                i+=1
        if flag==1:
            if oneCount == myMap["1"]:
                break
            else:
                zeroCount+=1
        i+=1
    print(zeroCount)
    testcases-=1"""

"""testcases = int(input())
while testcases > 0:
    n,m = map(int,input().split())
    myArray=[]
    for i in range(n):
        myString = input()
        myArray.append(myString)
    i=0
    j=m-1
    count=0
    while i<n-1:
        if myArray[i][j]=="R":
            count+=1
        i+=1
    i=n-1
    j=0
    while j<m-1:
        if myArray[i][j]=="D":
            count+=1
        j+=1
    print(count)
    testcases-=1"""

"""testcases = int(input())
while testcases > 0:
    x,y = map(int,input().split())
    myString = input()
    myMap=dict()
    flag1=0
    flag2=0
    for i in range(len(myString)):
        if myMap.get(myString[i])==None:
            myMap[myString[i]]=1
        else:
            myMap[myString[i]]+=1
    if x>0:
        if myMap.get('R')!=None:
            if myMap['R']>=x:
                flag1=1
    elif x<0:
        if myMap.get('L')!=None:
            if myMap['L']>=abs(x):
                flag1=1
    else:
        flag1=1
    if y>0:
        if myMap.get('U')!=None:
            if myMap['U']>=y:
                flag2=1
    elif y<0:
        if myMap.get('D')!=None:
            if myMap['D']>=abs(y):
                flag2=1
    else:
        flag2=1
    if flag1 and flag2:
        print("YES")
    else:
        print("NO")
    testcases-=1"""

"""length = int(input())
myString = input()

finalString = ""
i=0
j=1
while i<len(myString):
    finalString+=myString[i]
    i = i + j
    j = j + 1
print(finalString)"""

"""a = int(input())
b= a
while True:
    c = b
    c = str(c)
    total= 0
    for i in range(len(c)):
        total += int(c[i])
    if total%4==0:
        print(b)
        break
    else:
        b+=1"""
"""n=int(input())
myArray = list(map(int,input().split()))
myMap=dict()
for i in range(len(myArray)):
    if myMap.get(myArray[i])==None:
        myMap[myArray[i]]=1
    else:
        myMap[myArray[i]]+=1
a = max(myMap , key=myMap.get)
print(myMap[a])"""

"""testcases = int(input())
while testcases > 0:
    cost = 0
    n , c0 , c1 , h = map(int,input().split())
    myString = input()
    myMap= dict()
    for i in range(len(myString)):
        if myMap.get(myString[i])==None:
            myMap[myString[i]] = 1
        else:
            myMap[myString[i]] += 1
    if myMap.get('0')!=None and myMap.get('1') !=None:
        if c0*myMap['0'] < c1*myMap['1']:
            if h+c0 < c1:
                cost = c0*myMap['0'] + h*myMap['1'] + c0*myMap['1']
            else:
                cost = c0*myMap['0'] + c1*myMap['1']
        elif c0*myMap['0'] > c1*myMap['1']:
            if h+c1 < c0:
                cost = c1*myMap['1'] + h*myMap['0'] + c1*myMap['0']
            else:
                cost = c0*myMap['0'] + c1*myMap['1']
        else:
            cost = c0*myMap['0'] + c1*myMap['1']
    elif myMap.get('0') == None and myMap['1']!=None:
        if c0+h < c1:
            cost = c0*myMap['1'] + myMap['1']*h
        else:
            cost = c1*myMap['1']
    elif myMap.get('1')==None and myMap['0']!=None:
        if c1+h < c0:
            cost = h*myMap['0'] + c1*myMap['0']
        else:
            cost = c0*myMap['0']
    print(cost)
    testcases-=1"""

"""n,k = map(int,input().split())
myArray = list(map(int, input().split()))
maxNo = -1
count=0
for i in range(len(myArray)):
    maxNo = max(maxNo , myArray[i])
if maxNo <= k:
    print(len(myArray))
else:
    i=0
    j=len(myArray)-1
    while i<=j:
        if myArray[i] <= k:
            i+=1
            count+=1
        elif myArray[j] <= k:
            j-=1
            count+=1
        else:
            break
    print(count)"""

"""n = int(input())
myMap = dict()
myArray = list(map(int,input().split()))
for i in range(len(myArray)):
    if myMap.get(myArray[i])==None:
        myMap[myArray[i]]=1
    else:
        myMap[myArray[i]]+=1
i=0
while i<len(myArray):
    if myMap[myArray[i]] > 1:
        myMap[myArray[i]]-=1
        myArray.pop(i)
    else:
        i+=1
print(len(myArray))
for i in range(len(myArray)):
    print(myArray[i], end=" ")"""

"""sticks, k = map(int,input().split())
a = int(sticks/k)

if a%2==0:
    print("NO")
else:
    print("YES")"""

"""testcases = int(input())
while testcases > 0:
    n,m = map(int,input().split())
    myArray = list(map(int,input().split()))
    total = 0
    flag=0
    for i in range(1,len(myArray)):
        total+=myArray[i]
    if total > m-myArray[0]:
        print(m)
    else:
        print(total+myArray[0])
    testcases-=1"""

"""testcases = int(input())
while testcases>0:
    n = int(input())
    myString = input()
    length = 0
    i=len(myString)-1
    while i>=0:
        if myString[i]==")":
            length+=1
            i-=1
        else:
            break
    d = n-length
    if d>=length:
        print("NO")
    else:
        print("YES")
    testcases-=1"""

testcases = int(input())
while testcases > 0:
    n,k = map(int,input().split())
    myArray = list(map(int,input().split()))
    maxElement = max(myArray)
    myList1=[]
    myList2=[]
        
    for i in range(len(myArray)):
        myArray[i]=maxElement-myArray[i]
        myList1.append(myArray[i])
    maxElement = max(myArray)
    for i in range(len(myArray)):
        myArray[i] = maxElement - myArray[i]
        myList2.append(myArray[i])
    if k%2!=0:
        for i in range(len(myList1)):
            if i!=len(myList1)-1:
                print(myList1[i],end=" ")
            else:
                print(myList1[i])
    else:
        for i in range(len(myList2)):
            if i!=len(myList2)-1:
                print(myList2[i], end=" ")
            else:
                print(myList2[i])
    testcases-=1