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:   Set $d$ to be the maximum value of your array.  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 \le t \le 100$). Description of the test cases follows.

The first line of each test case contains two integers $n$ and $k$ ($1 \leq n \leq 2 \cdot 10^5, 1 \leq k \leq 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 \leq a_{i} \leq 10^9)$ – the initial contents of your array.

It is guaranteed that the sum of $n$ over all test cases does not exceed $2 \cdot 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]$.

Difficulty: interview

Starter code:

Solutions:
def f(arr):
    d = max(arr)
    for i in range(len(arr)):
        arr[i] = d - arr[i]


# for _ in range(1):
for _ in range(int(input())):
    n, k = list(map(int, input().split()))
    # n = int(input())
    arr = list(map(int, input().split()))
    if k <= 2:
        for i in range(k):
            f(arr)
    elif k % 2 == 1:
        for i in range(3):
            f(arr)
    else:
        for i in range(4):
            f(arr)
    print(*arr)


for _ in range(int(input())):
    n, k = list(map(int, input().split()))
    arr = list(map(int, input().split()))
    m = max(arr)
    for i in range(n):
        arr[i] = m-arr[i]
    k -= 1
    if k%2 == 1:
        m = max(arr)
        for i in range(n):
            arr[i] = m-arr[i]
    print(*arr)


t = int(input())
for _ in range(t):
	n, k = list(map(int, input().split()))
	arr = [int(j) for j in input().split()]
	ma = max(arr)

	for i in range(n):
		arr[i] = ma - arr[i]

	k -= 1

	if k%2 == 0:
		print(*arr)
	else:
		ma = max(arr)
		for i in range(n):
			arr[i] = ma - arr[i]
		print(*arr)


"""T=int(input())
for _ in range(0,T):
    n=int(input())
    a,b=map(int,input().split())
    s=input()
    s=[int(x) for x in input().split()]
    for i in range(0,len(s)):
        a,b=map(int,input().split())"""


T=int(input())
for _ in range(0,T):
    n,k=list(map(int,input().split()))
    s=[int(x) for x in input().split()]

    kk=max(s)
    for i in range(0,len(s)):
        s[i]=kk-s[i]
    k-=1
    if(k%2==0):
        print(*s)
    else:
        kk=max(s)
        for i in range(0,len(s)):
            s[i]=kk-s[i]
        print(*s)


T = int(input())
for _ in range(T):
    N, K = list(map(int, input().split()))
    A = [int(a) for a in input().split()]
    m = max(A)
    A = [m - a for a in A]
    if K % 2 == 0:
        m = max(A)
        A = [m - a for a in A]
    print(*A)


#from collection import defaultdict as dd
import sys
input=sys.stdin.readline
t=int(input())
while t:
    #n=int(input())
    n,k=map(int,input().split())
    l=list(map(int,input().split()))
    mx=max(l)
    for i in range(n):
        l[i]=mx-l[i]
    k-=1
    if(k%2==0):
        print(*l)
    else:
        mx=max(l)
        for i in range(n):
            l[i]=mx-l[i]
        print(*l)
    t-=1

t=int(input())
for you in range(t):
    l=input().split()
    n=int(l[0])
    k=int(l[1])
    l=input().split()
    li=[int(i) for i in l]
    x=min(li)
    y=max(li)
    if(k%2):
        for i in li:
            print(y-i,end=" ")
        print()
    else:
        for i in li:
            print(i-x,end=" ")
        print()


import sys
input = sys.stdin.readline

def calc(A):
    M=max(A)
    return [M-a for a in A]

t=int(input())
for tests in range(t):
    n,k=list(map(int,input().split()))
    A=list(map(int,input().split()))

    if k%2==0:
        k=2
    else:
        k=1

    for j in range(k):
        A=calc(A)

    print(*A)

    


for _ in range(int(input())):
    n,k=list(map(int,input().split()))
    a=list(map(int,input().split()))
    n,m=min(a),max(a)
    b=[m-x for x in a]
    c=[x-n for x in a]
    if k&1:
        print(*b)
    else:
        print(*c)


for _ in range(int(input())):

    n,k = map(int,input().split())
    a = list(map(int,input().split()))

    if k > 5:
        if k % 2 == 0:
            k = 4
        else:
            k = 5

    def f(v):
        m = max(v)
        for i in range(n):
            v[i] = m - v[i]
        return v

    for _ in range(k):
        a = f(a)
    print(*a)

def solve():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    def do(u):
        j = max(u)
        return [j - i for i in u]
    b = []
    b.append(do(a))
    b.append(do(b[-1]))
    print(*b[(k - 1) % 2])

t = int(input())
for _ in range(t):
    solve()

from queue import Queue

def rn():
    a = int(input())
    return a


def rl():
    a = list(map(int, input().split()))
    return a


for _ in range(rn()):
    [n,k] = rl()
    a = rl()
    b = a.copy()
    c = max(a)
    for i in range(n):
        b[i] = c-b[i]
    c = max(b)
    d = b.copy()
    for i in range(n):
        d[i] = c-d[i]
    if k%2 == 0:
        print(*d)
    else:
        print(*b)



import sys
input = sys.stdin.readline

t = int(input())
for _ in range(t):
    n, k = list(map(int, input().split()))
    if k > 4:
        k -= 2 * ((k - 5)//2)

    l = list(map(int, input().split()))
    for i in range(k):
        d = max(l)
        for j in range(n):
            l[j] = d - l[j]
    print(' '.join(map(str,l)))


for i in range(int(input())):
	n, k = list(map(int, input().split()))
	a = list(map(int, input().split()))
	m = max(a)
	for i, val in enumerate(a):
		a[i] = m-a[i]
	k -= 1

	if k%2 == 0:
		print(" ".join(str(num) for num in a))
	else:
		m = max(a)
		print(" ".join(str(m-num) for num in a))


import sys
readline = sys.stdin.readline

T = int(readline())
Ans = [None]*T
for qu in range(T):
    N, K = map(int, readline().split())
    A = list(map(int, readline().split()))
    K -= 1
    ma = max(A)
    A = [ma - a for a in A]
    if K & 1:    
        ma = max(A)
        A = [ma - a for a in A]
    Ans[qu] = ' '.join(map(str, A))
print('\n'.join(Ans))

t=int(input())
for _ in range(t):
    n,k=map(int,input().split())
    a=list(map(int,input().split()))
    s=max(a)
    t=min(a)
    ans=[]
    if k%2==0:
      for i in range(n):
        ans.append(str(a[i]-t))
    else:
      for i in range(n):
        ans.append(str(s-a[i]))
    print(' '.join(ans))

input=__import__('sys').stdin.readline
for _ in range(int(input())):
    n,k=map(int,input().split())
    s=list(map(int,input().split()))
    for _ in range((k+1)%2+1):
        f=max(s)
        for i in range(n):s[i]=f-s[i]
    print(*s)

for _ in range(int(input())):
    n,k=list(map(int,input().split()))
    a=list(map(int,input().split()))
    c=[]
    d=max(a)
    for i in range(n):
        c.append(d-a[i])
    d=max(c)
    e=[]
    for i in range(n):
        e.append(d-c[i])
    if k==0:
        print(*a)
    elif k%2==0:
        print(*e)
    else:
        print(*c)


t = int(input())

for _ in range(t):
    n, k = list(map(int, input().split()))
    first = list(map(int, input().split()))
    k -= 1
    
    m = max(first)
    for i in range(n):
        first[i] = m-first[i]
        
    second = first.copy()
    m = max(second)
    
    for i in range(n):
        second[i] = m-second[i]
        
    if k%2 == 0:
        print(*first)
    else:
        print(*second)


from sys import exit,stdin,stderr
def rl():
    return [int(w) for w in stdin.readline().split()]

T, = rl()
for _ in range(T):
    n,k = rl()
    a = rl()
    d = max(a)
    a = [d - x for x in a]
    if k % 2 == 0:
        d = max(a)
        a = [d - x for x in a]
    print(*a)