Roman has no idea, why this problem is called Stone. He also has no idea on how to solve the followong problem: given array of N integers A and a number K. During a turn the maximal value over all Ai is chosen, let's call it MAX. Then Ai = 
MAX - Ai is done for every 1 <= i <= N. Help Roman to find out how will the array look like after K turns.

-----Input-----
The numbers N and K are given in the first line of an input. Then N integers are given in the second line which denote the array A. 

-----Output-----
Output N numbers on a single line. It should be the array A after K turns.

-----Constraints-----

- 1 <= N <= 105
- 0 <= K <= 109
- Ai does not exceed 2 * 109 by it's absolute value.

-----Example-----
Input:
4 1
5 -1 7 0

Output:
2 8 0 7

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
(n, k) = list(map(int, input().split()))
A = list(map(int, input().split()))
maximum = max(A)
minimum = min(A)
if k == 0:
	for i in A:
		print(i, end=' ')
elif k & 1:
	for i in A:
		print(maximum - i, end=' ')
else:
	for i in A:
		print(i - minimum, end=' ')


(n, k) = input().split()
n = int(n)
k = int(k)
a = list((int(x) for x in input().split()))
if k == 0:
	print(' '.join((str(x) for x in a)))
elif k % 2 == 0:
	m = max(a)
	a = [m - x for x in a]
	m = max(a)
	a = [m - x for x in a]
	print(' '.join((str(x) for x in a)))
else:
	m = max(a)
	a = [m - x for x in a]
	print(' '.join((str(x) for x in a)))


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


def pf(a):
	M = max(a)
	for j in range(len(a)):
		a[j] = M - a[j]
(n, k) = list(map(int, input().split()))
a = list(map(int, input().split()))
if k > 0:
	pf(a)
	if k % 2 == 0:
		pf(a)
print(' '.join(map(str, a)))


import sys

def stone(s):
	(n, k) = list(map(int, s.split()))
	l = list(map(int, sys.stdin.readline().split()))
	if k % 2 == 1:
		k = 1
	elif k % 2 == 0 and k != 0:
		k = 2
	else:
		k = 0
	for j in range(k):
		m = max(l)
		for i in range(n):
			l[i] = m - l[i]
	s1 = ''
	for i in range(n):
		s1 += str(l[i]) + ' '
	print(s1)
stone(sys.stdin.readline())


def printo(arr):
	for i in range(len(arr)):
		print(arr[i], end=' ')
	print('')
(n, k) = (int(e) for e in input().strip().split())
arr = [int(e) for e in input().strip().split()]
flag = 0
if k == 0:
	printo(arr)
	flag = 1
if flag == 0:
	mx = max(arr)
	for i in range(n):
		arr[i] = mx - arr[i]
	if k % 2 == 1:
		printo(arr)
	else:
		mx = max(arr)
		for i in range(n):
			arr[i] = mx - arr[i]
		printo(arr)


line1 = input().split(' ')
line2 = input().split(' ')
n = int(line1[0])
k = int(line1[1])
moves = k % 2
a = [0 for x in range(n)]
for i in range(n):
	a[i] = int(line2[i])
if moves == 0:
	moves = 2
while moves > 0:
	m = -20000000000
	for i in range(n):
		if a[i] > m:
			m = a[i]
	for i in range(n):
		a[i] = m - a[i]
	moves -= 1
ans = ''
for i in range(n):
	ans += str(a[i]) + ' '
if k == 0:
	ans = ''
	for i in range(n):
		ans += line2[i] + ' '
print(ans)


k1 = input()
k1 = list(map(int, k1.split(' ')))
k = k1[1]
ar = input()
ar = list(map(int, ar.split(' ')))
if k == 0:
	for i in ar:
		print(i, end=' ')
elif k % 2 == 1:
	max1 = max(ar)
	for i in range(0, len(ar)):
		ar[i] = max1 - ar[i]
	for i in ar:
		print(i, end=' ')
else:
	for l in range(0, 2):
		max1 = max(ar)
		for i in range(0, len(ar)):
			ar[i] = max1 - ar[i]
	for i in ar:
		print(i, end=' ')


(n, k) = list(map(int, input().split()))
a = list(map(int, input().split()))
max1 = max(a)
min1 = min(a)
if k == 0:
	for i in range(n):
		print(a[i], end=' ')
elif k % 2 == 1:
	for i in range(n):
		print(max1 - a[i], end=' ')
else:
	for i in range(n):
		print(a[i] - min1, end=' ')


(N, K) = list(map(int, input().split()))
A = list(map(int, input().split()))
for i in range(min(K, K % 2 + 2)):
	m = max(A)
	A = [m - j for j in A]
print(' '.join(map(str, A)))


(n, k) = input().split()
(n, k) = (int(n), int(k))
a = list(map(int, input().split()))
maxi = 0
mini = 0
if k != 0:
	maxi = max(a)
	mini = min(a)
mini = maxi - mini
for i in range(n):
	a[i] = maxi - a[i]
if k % 2 == 0:
	for i in range(n):
		a[i] = mini - a[i]
print(' '.join(map(str, a)))


import sys

def solve(n, k, a):
	for i in range(k):
		max_a = max(a)
		for i in range(len(a)):
			a[i] = max_a - a[i]
	print(' '.join([str(x) for x in a]))

def main():
	parts = sys.stdin.readline().strip().split(' ')
	n = int(parts[0])
	k = int(parts[1])
	if k > 2:
		k %= 2
		if k == 0:
			k = 2
	a = [int(x) for x in sys.stdin.readline().strip().split(' ')]
	solve(n, k, a)
main()


N = input()
A = input()
N = N.split()
A = A.split()
N = list(map(int, N))
A = list(map(int, A))
MAX = max(A)
MIN = min(A)
if N[1] == 0:
	for i in range(N[0]):
		print(A[i], end=' ')
elif N[1] % 2 == 1:
	for i in range(N[0]):
		A[i] = MAX - A[i]
		print(A[i], end=' ')
else:
	for i in range(N[0]):
		A[i] = A[i] - MIN
		print(A[i], end=' ')


def Turn(a, n):
	m = max(a)
	for i in range(n):
		a[i] = m - a[i]
(n, k) = list(map(int, input().split()))
a = list(map(int, input().split()))
if k > 0:
	Turn(a, n)
	k -= 1
	if k & 1 == 1:
		Turn(a, n)
print(' '.join(map(str, a)))


line = input().split()
N = int(line[0])
K = int(line[1])
b = list(map(int, input().split()))
i = 0
if K == 0:
	print(' '.join((str(x) for x in b)))
else:
	mx = max(b)
	for j in range(0, N):
		b[j] = mx - b[j]
	if K % 2 == 0:
		mx = max(b)
		for j in range(0, N):
			b[j] = mx - b[j]
		print(' '.join((str(x) for x in b)))
	else:
		print(' '.join((str(x) for x in b)))


(n, k) = list(map(int, input().split()))
a = list(map(int, input().split()))
b = 0
c = 110000000
for d in a:
	b = max(b, d)
	c = min(d, c)
if k == 0:
	for x in a:
		print(x, end=' ')
elif k % 2 == 0:
	for x in a:
		print(x - c, end=' ')
else:
	for x in a:
		print(b - x, end=' ')


import sys

def __starting_point():
	(n, k) = [int(u) for u in sys.stdin.readline().strip().split()]
	val = [int(u) for u in sys.stdin.readline().strip().split()]
	ans = ''
	if k > 0:
		maxval = max(val)
		for i in range(n):
			val[i] = maxval - val[i]
		maxval = max(val)
		if k % 2 == 0:
			for i in range(n):
				ans += str(maxval - val[i]) + ' '
			print(ans[:-1])
		else:
			for i in range(n):
				ans += str(val[i]) + ' '
			print(ans[:-1])
	else:
		for i in range(n):
			ans += str(val[i]) + ' '
		print(ans[:-1])
__starting_point()


(n, k) = list(map(int, input().split()))
a = list(map(int, input().split()))
m1 = max(a)
m2 = min(a)
if k == 0:
	for i in a:
		print(i, end=' ')
elif k % 2 == 1:
	for i in a:
		print(m1 - i, end=' ')
else:
	for i in a:
		print(i - m2, end=' ')


import sys
(n, k) = list(map(int, input().split()))
a = list(map(int, input().split()))
if k == 0:
	print(' '.join(map(str, a)))
elif k % 2 == 1:
	ma = max(a)
	print(' '.join(map(str, [ma - i for i in a])))
else:
	mi = min(a)
	print(' '.join(map(str, [i - mi for i in a])))
return